Magic Time for Game Modules
v1.0
Last updated
v1.0
Last updated
Usually GameTime will progress by Time.deltaTime each frame. However, the Magic Time integration brings the TimeboardMagicTimeUser
class, which is a MagicTimeUser
, and will automatically modify the progression of GameTime by the final value of the subscribed LocalTimeScales
.
To utilize this, add the TimeboardMagicTimeUser
component to your Timeboard
prefab.
I suggest you set the value of Transition Duration to 0f
. If you attach this to another object, then remember to populate the Timeboard field. Otherwise, this will be populated for you.
Make sure to populate the Initial Time Scales as well. In the example above, we subscrie to the "Global" time scale, which handles the overall time progression of the game.
Everything is is automatic!
You may wish to save the Timeboard prefab as a new prefab variant, since you have modified the component on this object. This will reduce the risk that a future update to Game Modules may overwrite the Timeboard prefab.