コード例 #1
0
ファイル: GameSceneManager.cs プロジェクト: twitz/UCC
    private IEnumerator LoadScene(int sceneIndex)
    {
        isLoadingScene = true;
        OnLoadingSceneBegin?.Invoke();
        if (CurrentLevel != NoLevel && CurrentLevel != sceneIndex)
        {
            yield return(SceneManager.UnloadSceneAsync(CurrentLevel));
        }
        yield return(SceneManager.LoadSceneAsync(sceneIndex, LoadSceneMode.Additive));

        isLoadingScene = false;
        CurrentLevel   = sceneIndex;
        OnLoadingSceneComplete?.Invoke();
    }
コード例 #2
0
 void OnSceneLoadCompleted(AsyncOperation opertation)
 {
     bIsLoadingScene = false;
     OnLoadingSceneComplete?.Invoke();
 }