Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


activeSelf

The local active state of the GameObject. True if active, false if inactive. (Read Only)
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public bool activeSelf { get; }

Remarks

The local active state of this GameObject, which is set using GameObject.SetActive. A locally active GameObject may still be inactive in the scene hierarchy because a parent is not active. Use GameObject.activeInHierarchy if you want to check if the GameObject is actually treated as active in the Scene.