using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class Door : Switchable { public Transform plank; public override void OnSwitch(bool on) { plank.GetComponent().enabled = !on; plank.GetComponent().enabled = !on; } }