Documentation

Unity Engine

Download Unity

Unity Engine

OnEnable()

Called when the graph is created or loaded in the editor.
Read time 1 minuteLast updated 13 days 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 code reload or when reopening the asset. This method complements Graph.OnDisable and is useful for maintaining consistency across editor sessions.