Пример #1
0
    void LoadScene()
    {
        switch (kickedScene)
        {
        case "startMenu":
            nextSceneName = "settingCourse";
            if (AppUtil.isMulti == 1)
            {
                StartCoroutine(PhotonObj.startConnect());
            }
            break;

        case "settingCourse":
            nextSceneName = "Racing";
            break;

        default:
            nextSceneName = "startMenu";
            PhotonObj.endMultiPlay();
            AppUtil.isMulti = 0;
            break;
        }
        AppUtil.currentScene = nextSceneName;
        async = SceneManager.LoadSceneAsync(nextSceneName);
        // LoadSceneMode.AdditiveにするとMapが消える
        // async = SceneManager.LoadSceneAsync(nextSceneName, LoadSceneMode.Additive);
        async.allowSceneActivation = false;
        loadingCoroutine           = StartCoroutine(waitUntilLoadEnd());
    }