using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameController : MonoBehaviour { [System.NonSerialized] public GameObject gameNode; void Start() { gameNode = transform.GetChild(0).gameObject; if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "GameDemo") { gameNode.SetActive(false); } } [System.NonSerialized] public bool crossHairIsOn = true; void Update() { if (Input.GetKeyDown(KeyCode.F1)) { gameNode.SetActive(!gameNode.activeSelf); } if (Input.GetKeyDown(KeyCode.F2)) { crossHairIsOn = !crossHairIsOn; } } }