トグルボタンを押させない(インタラクティブをOffにする),ためのスクリプト.
setactivateをfalseするのは違う
using UnityEngine; using System.Collections; using UnityEngine.UI;//need this public class btnDisable : MonoBehaviour { public Transform myButton; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } //assign to btn obj this script, can access inspector. public void mybtnDisable () { myButton.GetComponent<Toggle>().interactable = false; } }