OnEnable

The OnEnable method is a Unity lifecycle method that is called when the GameObject becomes active or when the script component is enabled. It's useful for setting up event subscriptions, starting coroutines, and initializing state when objects become active.

More in Unity API

  1. Components
    1. GetComponent<>()
  2. Serialized Field
  3. Inspector
  4. Debugging
    1. debug.log
  5. MonoBehaviour
    1. Awake
    2. Start
    3. Update
    4. OnEnable
    5. FixedUpdate

All 48 topics in the Fundamentals Program