diff options
Diffstat (limited to 'GameCode/DisableObjects.cs')
-rw-r--r-- | GameCode/DisableObjects.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/GameCode/DisableObjects.cs b/GameCode/DisableObjects.cs new file mode 100644 index 0000000..e6c7516 --- /dev/null +++ b/GameCode/DisableObjects.cs @@ -0,0 +1,24 @@ +using UnityEngine; + +public class DisableObjects : MonoBehaviour +{ + public bool playOnAwake = true; + + public GameObject[] objects; + + private void Start() + { + if (playOnAwake) + { + DoIt(); + } + } + + private void DoIt() + { + for (int i = 0; i < objects.Length; i++) + { + objects[i].SetActive(value: false); + } + } +} |