Documentation

Unity Engine

Download Unity

Unity Engine

OnEnable()

Called when the state machine is created or loaded in the editor.
Read time 1 minuteLast updated 2 months ago

Definition

public virtual void OnEnable()

Remarks

Override this method to perform setup tasks, such as allocating resources, initializing internal state, or preparing data for editing. This method is invoked each time the graph becomes active in the editor, including after domain reload or when reopening the asset.