void Awake()
{
if (Instance != this)
{
Destroy(gameObject);
return;
}
DontDestroyOnLoad(gameObject);
m_PlayerInput = FindObjectOfType <PlayerInput>();
if (initialSceneTransitionDestination != null)
{
SetEnteringGameObjectLocation(initialSceneTransitionDestination);
ScreenFader.SetAlpha(1f);
StartCoroutine(ScreenFader.FadeSceneIn());
initialSceneTransitionDestination.OnReachDestination.Invoke();
}
else
{
m_CurrentZoneScene = SceneManager.GetActiveScene();
m_ZoneRestartDestinationTag = SceneTransitionDestination.DestinationTag.A;
}
}