private IEnumerator LoadScenes(StateEventArgs <TState> args, string mainScene, string[] scenes)
        {
            using (args.GetTransitionScope(this)) {
                IsLoading = true;

                // Wait for other visual transitions to finish up first.
                yield return(args.WaitForTransitions(this, WaitForTransitionTypes));

                // If game is starting up and scene is already loaded, don't reload it all over again.
                // Useful (for debug) when entering play mode from any scene that is not the boot up one.
                if (args.PrevState.CompareTo(default) == 0 || !SceneManager.GetSceneByName(mainScene).isLoaded)