/// <summary>Transition to the given scene, then callback.</summary> public static void LoadScene(SceneName sceneName, System.Action callback) { Assert.IsTrue(!_isLoadingScene, $"[SceneController] Tried to load scene '{sceneName}' but a scene load is already in progress."); _isLoadingScene = true; CoroutineRunner.Run(Coroutine_TransitionToScene(sceneName, callback)); }
/// <summary> /// Load the static level config for the given level. The file can be in PersistentDataPath, /// StreamingAssets, or Resources, in that order; the first file found will be loaded. /// See GetLevelResourceName() for the filename format. /// </summary> /// <param name="levelIndex">The index of the level config to be loaded.</param> /// <param name="callback">Returns the loaded config. Can not be null.</param> public static void LoadAsync(int levelIndex, Action <int, LevelConfig> callback) { CoroutineRunner.Run(LoadAsync_Coroutine(levelIndex, callback)); }
public static void Initialize() { CoroutineRunner.Run(LoadWords_Coroutine((wm) => { Words = wm; })); }