class in UnityEditor.Scripting.LifecycleManagement
/
Inherits from:Unity.Scripting.LifecycleManagement.LifecycleAttributeBase
Marks a static method as a callback to be invoked when the Editor enters Edit mode.
Methods marked with this attribute are called when entering Edit mode. This happens:
Use this callback to:
This is a method attribute that can only be applied to static methods with no parameters and return type void.
Additional resources: OnExitingEditModeAttribute, OnEnteringPlayModeAttribute, AfterManagedObjectsRestoredAttribute.
using UnityEditor.Scripting.LifecycleManagement; using UnityEngine;
public static partial class EditorModeManager { [OnEnteringEditMode] static void OnEditModeEntered() { Debug.Log("Entered Edit mode"); } }
| Constructor | Description |
|---|---|
| OnEnteringEditModeAttribute | Marks the decorated static method to be invoked when entering Edit mode. |