using UnityEngine; using System.Collections; namespace ProjectX { public class VisibleLocker : MonoBehaviour { public bool visible = true; void Update() { if (this.GetComponent() != null && this.GetComponent().enabled != this.visible) { this.GetComponent().enabled = this.visible; } } } }