using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UIOperatedCtrl : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { if (GameSettings.othersSettings.playState != PlayState.None) { if (GameSettings.othersSettings.playState == PlayState.Playing) { gameObject.GetComponent().enabled = false; } else { gameObject.GetComponent().enabled = true; } } } }