Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Additive Scenes #1

Open
Open
Assignees
@mbbmbbmm

Description

Hi!
I am using UnityTimer in the context of additive scenes. I have a main scene as a kind of manager scene that is never unloaded, but it cannot be the active scene most of the time. It needs to hold the TimerManager because the other scenes are all volatile. My workaround for now was to spawn a dummy timer at startup in the main scene and setting it to loop so it will always be there.

Would it be OK to make the TimerManager class public instead and add it manually from a different script in the main scene?

void Start()
{
 GameObject managerObject = new GameObject { name = "TimerManager" };
 managerObject.AddComponent<Timer.TimerManager>();
}

I made a little test and it seems to work, but I am not sure if there are going to be problems if TimerManager is public.

Thanks!
Jan

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /