menu_bookDocumentation

Component Lifecycle: Full Callback Order — OnAwake, OnEnabled, OnStart, OnUpdate, OnFixedUpdate, OnDisabled, OnDestroy

calendar_today May 4, 2026 schedule ~2 min read person patrickjr verified 50

Component Lifecycle: Full Callback Order

s&box components have a well-defined lifecycle. Understanding the exact order prevents subtle bugs.

Callback Order

CallbackWhen Called
OnAwake()Once, when the component first becomes active. Called before OnEnabled. Interpolation is disabled during this call.
OnEnabled()After OnAwake, and every time the component transitions from disabled → enabled. Interpolation is disabled during this call.
OnStart()Once, before the first OnUpdate or OnFixedUpdate. Called lazily — deferred until the next update tick.
OnUpdate()Every frame while enabled. Not called on a dedicated server.
OnFixedUpdate()On a fixed interval (physics tick rate). Time.Delta is the fixed interval.
OnPreRender()Every frame, just before rendering. Not called on a dedicated server or headless.
OnDisabled()Every time the component transitions from enabled → disabled.
OnDestroy()Once, when the component is destroyed. After this, GameObject is set to null.

Key Behaviors

Action Graph Callbacks

Components also expose Action properties for no-code use:


These are only invoked when !Scene.IsEditor.

Example

CSHARP
public class MyComponent : Component
{
    protected override void OnAwake()
    {
        // Runs once. Transform interpolation is disabled here.
        Log.Info( "Awake" );
    }

    protected override void OnEnabled()
    {
        // Runs each time we become active.
        Log.Info( "Enabled" );
    }

    protected override void OnStart()
    {
        // Runs once, before first Update.
        Log.Info( "Start" );
    }

    protected override void OnUpdate()
    {
        // Every frame.
    }

    protected override void OnFixedUpdate()
    {
        // Fixed timestep. Time.Delta is the fixed interval.
    }

    protected override void OnDisabled()
    {
        Log.Info( "Disabled" );
    }

    protected override void OnDestroy()
    {
        // After this, IsValid == false.
        Log.Info( "Destroyed" );
    }
}
Was this helpful?