void Awake() { if (instance != null && instance != this) { duplicated = true; Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); initialize(); } }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } setupButtons(); // locate the buttons GUIScreenLayoutManager.Instance.register(this); TransitionGUIFxManager.Instance.register(this, false); }