/** * support recompile in editor */ #if UNITY_EDITOR void Update() { if (_instance == null) { _instance = this; } }
/** * Awake.. */ void Awake() { _instance = this; if (confirmOverlay != null && confirmOverlay.gameObject.activeSelf) { confirmOverlay.gameObject.SetActive(false); } if (notEnoughCoinsOverlay != null && notEnoughCoinsOverlay.gameObject.activeSelf) { notEnoughCoinsOverlay.gameObject.SetActive(false); } if (Time.frameCount < 3) { instance.gameObject.SetActive(false); } }