0

Chronos and addative/multi-scene

David Bator 2 months ago updated 2 months ago 0

Hey all, 

I've been having some issues figuring out how to correctly setup Chronos in my multi scene game. In my game I have a core scene that contains my static universal objects (My player, the main camera, some managers, etc). I then load and unload various scenes as the player moves through the game world. Ideally these scenes are all populated by objects that have timelines that refer to the timekeeper in my "core" scene. 

When integrating chronos I've run into some issues. I initially placed my timekeeper and global clocks into my core scene. Since this scene is always loaded first at runtime I figured this was the most logical place to put it. However this leads to some design time issues when setting up object->global clock relationships in my scene. It looks like the timeline object always wants a timeline loaded in the scene at edit time in order to get clocks. I run into errors if I place an instance of the time keeper in every scene as many instances of a singleton object now exist. 

I started digging into how the timelines found and integrated with the timekeeper but I figured before I went to deep I would ask if there's an established design pattern for this type of thing currently that I'm just missing. 

Chronos Version:
2.4.15
Unity Version:
Unity 2020.1.3f1