///----------------------------------------------------------------- /// Namespace: /// Class: /// Description: /// Author: Date: <29.07.2019> /// Notes: <> ///----------------------------------------------------------------- /// using System.Collections.Generic; using UnityEngine; namespace CozmoHelpers { public class SceneHelper : MonoBehaviour { [Tooltip("All the objects in this list will be deactivated/activated when the game is running")] public List toggleInPlayMode; public void Awake() { ToggleObjectList(); } // Deactivate/Activate all gameObjects referenced in the toggleInPlayMode list private void ToggleObjectList() { foreach (GameObject go in toggleInPlayMode) { go.SetActive(!go.activeSelf); } } } }