Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


enabled

Enabled Behaviours are Updated, disabled Behaviours are not.
Read time 1 minuteLast updated 5 days ago

Definition

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

Remarks

This is shown as the small checkbox in the inspector of the behaviour.

Examples

using UnityEngine;using System.Collections;using UnityEngine.UI; // Required when Using UI elements.public class Example : MonoBehaviour{ public Image pauseMenu; public void Start() { //Enables the pause menu UI. pauseMenu.enabled = true; }}