public void Start() { DontDestroyOnLoad(gameObject); if (_instanceLevelManager == null) _instanceLevelManager = this; else if (_instanceLevelManager != this) DestroyImmediate(gameObject); _currentLevel = _levelNames.ToList().IndexOf(Application.loadedLevelName); }
public void Start() { DontDestroyOnLoad(gameObject); if (_instanceLevelManager == null) { _instanceLevelManager = this; } else if (_instanceLevelManager != this) { DestroyImmediate(gameObject); } _currentLevel = _levelNames.ToList().IndexOf(Application.loadedLevelName); }