using UnityEngine; // A simple rotating script for the walls of the player area public class SmallEnabler : MonoBehaviour { public bool Activated = false; Renderer[] rendererComponents; void Start () { rendererComponents = GetComponentsInChildren (); } // Update is called once per frame void Update () { if (AM.i.GetPitch ()[0] < 0.5f) { Activated = true; } else { Activated = false; } foreach (Renderer component in rendererComponents) { component.enabled = Activated; } } }