enabled
Enabled Behaviours are Updated, disabled Behaviours are not.
阅读时间1 分钟最后更新于 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; }}