Exemplo n.º 1
0
        /// <summary>
        ///     Loads a scene
        /// </summary>
        /// <param name="scene"></param>
        /// <param name="loadMode"></param>
        /// <returns></returns>
        public static AsyncOperation LoadScene(TCScene scene, LoadSceneMode loadMode = LoadSceneMode.Single)
        {
            PreparingSceneLoadEvent?.Invoke(scene);
            Debug.Log($"The scene `{scene.scene}` was requested to be loaded.");

            AsyncOperation sceneLoad = SceneManager.LoadSceneAsync(scene.scene, loadMode);

            StartSceneLoadEvent?.Invoke(sceneLoad);

            return(sceneLoad);
        }
Exemplo n.º 2
0
 private static void CallOnStartSceneLoadEvent(bool fade = false, bool save = false)
 {
     StartSceneLoadEvent?.Invoke(fade, save);
 }