Time Zone
v1.0
Last updated
v1.0
Last updated
A Time Zone is an area, defined by a collider
, with its own Local Time Scale. Anything passing through this zone will automatically subscribe to the Local Time Scale, and unsubscribe as they leave the zone.
LocalTimeScale
at RuntimeThe Time Zone is able to create its own new LocalTimeScale
object at runtime, with a default starting value that you define.
Check the "Create new Local Time Scale" button to enable this, and then set the starting value you'd like.
LocalTimeScale
Scriptable ObjectAlternatively, you can choose to use an existing LocalTimeScale Scriptable Object which you've created in your project. At runtime, a new instance of this will be created, with the starting value defined in that object.
This is a good way to utilize LocalTimeScale
objects with a custom derived class that you've created for your project.
Even when multiple Time Zone objects use the same LocalTimeScale
Scriptable Object, each will have its own unique instance of the object.
Viewing the Inspector at runtime will display any Subscribers currently subscribed to this objects LocalTimeScale
.
You can ping the objects if you'd like to see specifically which object it is, and also remove it from the list -- useful for debugging.