private void OnDestroy() { if (uiCanvas != null) { instance = null; } }
private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; if (uiCanvas != null) { DontDestroyOnLoad(gameObject); } }
private void OnDestroy() { if (uiCanvas != null) { instance = null; } }
private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; if (uiCanvas != null) { DontDestroyOnLoad(gameObject); } }