ドキュメント

Unity Engine

Unity Engine

OnEnable()

Called when the graph is created or loaded in the editor.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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. This method complements Graph.OnDisable and is useful for maintaining consistency across editor sessions.