private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { if (Instance) { Debug.LogWarning("LobbyLevel already in scene! Deleting this gameobject!"); Destroy(gameObject); return; } Instance = this; }