using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class TFBoxActive : MonoBehaviour { public List TFBoxes; public void OnEnable() { foreach (GameObject tfBox in TFBoxes) { tfBox.GetComponent().enabled = false; } } public void OnDisable() { foreach (GameObject tfBox in TFBoxes) { tfBox.GetComponent().enabled = true; } } }