-
Notifications
You must be signed in to change notification settings - Fork 0
Usage.TimeUpdate Events
Namespace: Ju.Time
In order to provide callbacks of the most common loop events (update, fixed update, etc) and for some other advanced ones, there are multiple events that can be used to run code at a specific time in the loop of your application.
All these events have a float property called DeltaTime
with the delta time between the last event fired of that type.
Read the EventBus service API to see how to subscribe to events.
PreUpdate > Update > Unity Update > PostUpdate > Unity LateUpdate
PreFixedUpdate > FixedUpdate > Unity FixedUpdate > PreCollisionUpdate > Unity OnTrigger* > Unity OnCollision* > PostCollisionUpdate > PostFixedUpdate
It will be called before the TimeUpdateEvent
. Useful for early logic that you need to ensure that will be run before the Update.
The most common event. Useful for any code that needs to be run every tick of your application.
It will be called after the TimeUpdateEvent
. Useful for late logic that you need to ensure that will be run after the Update.
In Unity, this is equivalent to LateUpdate
in MonoBehaviours.
It will be called before the TimeFixedUpdateEvent
. Useful for early logic that you need to ensure that will be run before the FixedUpdate.
The second most common event. Useful for any code that needs to be run every tick with the same frequency. Heavy code that doesn't need to run every frame like physics or pathfinding usually goes here.
It will be called just after the TimeFixedUpdateEvent
and before the TimePostCollisionUpdateEvent
. Useful for logic that needs to be run after the FixedUpdate logic but just before the OnCollision and OnTrigger events.
It will be called after the TimePreCollisionUpdateEvent
and before the TimePostFixedUpdateEvent
. Useful for late logic that you need to ensure that will be run after the OnCollision and OnTrigger events but before the PostFixedUpdate event.
It will be called after the TimeFixedUpdateEvent
. Useful for late logic that you need to ensure that will be run after the FixedUpdate, PreCollision and PostCollision events.
Return to [Home]
- Home
- Install
- Manual
-
Core API
- Services:
- Util:
-
Unity API
- Services:
- Integrations: