private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { if (Instance != null) { Debug.LogError("Only one instance of singleton allowed"); } Instance = this; }
private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { if (Instance != null) { Debug.LogError("Only one instance of singleton allowed"); } Instance = this; }