Version: 2017.1

Selectable.IsInteractable

切换到手册
public bool IsInteractable ();

描述

UI.Selectable.IsInteractable。

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