|
1234567891011121314151617181920212223 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
-
- public class SceneHelper : MonoBehaviour
- {
- [Tooltip("All the objects in this list will be deactivated/activated when the game is running")]
- public List<GameObject> toggleInPlayMode;
-
-
- public void Awake()
- {
- ToggleObjectList();
- }
-
- private void ToggleObjectList()
- {
- foreach (GameObject go in toggleInPlayMode)
- {
- go.SetActive(!go.activeSelf);
- }
- }
- }
|