void OnDestroy() { if (ReferenceEquals(Instance, this)) { Instance = null; } }
void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; DontDestroyOnLoad(gameObject); CameraSet = new CameraSet(_cameraComponent, _audioListener, _deactivateMode); } }