예제 #1
0
 private void MenuSceneLoadedFresh()
 {
     ModelSaberAPI.HashAllAvatars();
     PluginUI.OnLoad();
     InGameOnlineController.OnLoad();
     SpectatingController.OnLoad();
     GetUserInfo.UpdateUserInfo();
 }
예제 #2
0
        private void MenuSceneLoadedFresh()
        {
            ModelSaberAPI.HashAllAvatars();
            PluginUI.OnLoad();
            InGameOnlineController.OnLoad();
            SpectatingController.OnLoad();
            GetUserInfo.UpdateUserInfo();

            if (joinAfterRestart)
            {
                joinAfterRestart = false;
                SharedCoroutineStarter.instance.StartCoroutine(PluginUI.instance.JoinGameWithSecret(joinSecret));
                joinSecret = string.Empty;
            }
        }
예제 #3
0
        private void ActiveSceneChanged(Scene from, Scene to)
        {
#if DEBUG
            Misc.Logger.Info($"Active scene changed from \"{from.name}\" to \"{to.name}\"");
#endif
            if (from.name == "EmptyTransition" && to.name == "Menu")
            {
                PluginUI.OnLoad();
                InGameOnlineController.OnLoad(to);
                SpectatingController.OnLoad();
            }
            else
            {
                InGameOnlineController.Instance?.ActiveSceneChanged(from, to);
                if (Config.Instance.SpectatorMode)
                {
                    SpectatingController.Instance?.ActiveSceneChanged(from, to);
                }
            }
        }