-
Notifications
You must be signed in to change notification settings - Fork 1
Usage.TimeUpdate Events
In order to provide callbacks of the most common loop events (update, fixed update, etc) and for some other advanced ones, there are multiple event structs 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
.
PreUpdate > Update > Unity Update > PostUpdate > Unity LateUpdate
PreFixedUpdate > FixedUpdate > Unity FixedUpdate > PreCollisionUpdate > Unity OnTrigger* > Unity OnCollision* > PostCollisionUpdate > PostFixedUpdate
It will be called before the LoopUpdateEvent
. 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 LoopUpdateEvent
. 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 LoopFixedUpdateEvent
. 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 normal tick like physics or pathfinding usually goes here.
It will be called just after the LoopFixedUpdateEvent
and before the LoopPostCollisionUpdateEvent
. 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 LoopPreCollisionUpdateEvent
and before the LoopPostFixedUpdateEvent
. 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 LoopFixedUpdateEvent
. Useful for late logic that you need to ensure that will be run after the FixedUpdate, PreCollision and PostCollision events.
Read the EventBus service API to see how to subscribe to events.
Return to [Home]
- Home
- Install
- Manual
-
Core API
- Services:
- Util:
-
Unity API
- Services:
- Integrations: