using UnityEngine; public class Hidden : MonoBehaviour { private void OnValidate() { base.gameObject.hideFlags = HideFlags.HideInHierarchy; } }