기술 자료

Unity Engine

Unity Engine

enabled

Enabled Behaviours are Updated, disabled Behaviours are not.
읽는 시간 1분최근 업데이트: 한 달 전

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; }}