Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseUI.Selectable.IsInteractable.
#pragma strict // required when using UI elements in scripts public class Example { public var startButton; function Update() { if (!startButton.IsInteractable()) { Debug.Log("Start Button has been Disabled"); } } }
using UnityEngine; using System.Collections; using UnityEngine.UI; // required when using UI elements in scripts
public class Example : MonoBehaviour { public Button startButton; void Update () { if (!startButton.IsInteractable ()) { Debug.Log("Start Button has been Disabled"); } } }