menu_bookDocumentation
Component Methods: OnLoad, OnAwake, OnStart, OnUpdate, OnFixedUpdate Lifecycle
Component lifecycle methods you can override:
OnLoad (async)
Called after deserialization for loading. Loading screen stays open until all OnLoad tasks complete.CSHARP
protected override async Task OnLoad()
{
LoadingScreen.Title = "Loading Something..";
await Task.DelayRealtimeSeconds( 1.0f );
}OnValidate
Called when a property changes in the editor and after deserialization. Good for enforcing property limits.OnAwake
Called once when created, only if parent GameObject is enabled. Called after deserialization and loading.OnStart
Called when the component is enabled for the first time. Always called before the first OnFixedUpdate.OnEnabled
Called when the component is enabled.OnUpdate
Called every frame.OnPreRender
Called every frame right before rendering. Not called on dedicated servers. Called after animation bones are calculated.OnFixedUpdate
Called every fixed timestep. Use for player movement and physics — reduces traces per frame and avoids tiny move deltas on high-FPS clients.OnDisabled
Called when the component is disabled.OnDestroy
Called when the component is destroyed.
Was this helpful?