Пример #1
0
        public static IEnumerator GoToScene(string sceneName)
        {
            FadeInOut.FadeOut();

            while (FadeInOut.IsFading)
            {
                yield return(null);
            }

            SceneManager.LoadScene(sceneName);
        }
Пример #2
0
        private void Awake()
        {
            if (_instance != null)
            {
                Destroy(gameObject);
                return;
            }

            _instance = this;
            DontDestroyOnLoad(gameObject);

            Cursor.visible = true;
            gameObject.SetActive(false);
        }
Пример #3
0
 private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
 {
     FadeInOut.FadeIn();
 }