private void MenuSceneLoadedFresh() { ModelSaberAPI.HashAllAvatars(); PluginUI.OnLoad(); InGameOnlineController.OnLoad(); SpectatingController.OnLoad(); GetUserInfo.UpdateUserInfo(); #if DEBUG DebugForm.MenuLoaded(); #endif }
private void MenuSceneLoaded() { InGameOnlineController.Instance?.MenuSceneLoaded(); if (Config.Instance.SpectatorMode) { SpectatingController.Instance?.MenuSceneLoaded(); } #if DEBUG DebugForm.MenuLoaded(); #endif }
public void OnApplicationStart() { #if DEBUG if (Environment.CommandLine.Contains("fpfc")) { QualitySettings.vSyncCount = 2; Application.targetFrameRate = 60; } #endif instance = this; #if DEBUG DebugForm.OnLoad(); #endif BSEvents.OnLoad(); BSEvents.menuSceneLoadedFresh += MenuSceneLoadedFresh; BSEvents.menuSceneLoaded += MenuSceneLoaded; BSEvents.gameSceneLoaded += GameSceneLoaded; if (Config.Load()) { log.Info("Loaded config!"); } else { Config.Create(); } try { PresetsCollection.ReloadPresets(); } catch (Exception e) { log.Warn("Unable to load presets! Exception: " + e); } Sprites.ConvertSprites(); ScrappedData.Instance.DownloadScrappedData(null); try { var harmony = HarmonyInstance.Create("com.andruzzzhka.BeatSaberMultiplayer"); harmony.PatchAll(Assembly.GetExecutingAssembly()); } catch (Exception e) { Plugin.log.Info("Unable to patch assembly! Exception: " + e); } }
public void OnApplicationStart() { #if DEBUG if (Environment.CommandLine.Contains("fpfc")) { QualitySettings.vSyncCount = 1; } #endif if (File.Exists("MPLog.txt")) { File.Delete("MPLog.txt"); } instance = this; #if DEBUG DebugForm.OnLoad(); #endif BSEvents.OnLoad(); BSEvents.menuSceneLoadedFresh += MenuSceneLoadedFresh; BSEvents.menuSceneLoaded += MenuSceneLoaded; BSEvents.gameSceneLoaded += GameSceneLoaded; if (Config.Load()) { Misc.Logger.Info("Loaded config!"); } else { Config.Create(); } try { PresetsCollection.ReloadPresets(); } catch (Exception e) { Misc.Logger.Warning("Unable to load presets! Exception: " + e); } Sprites.ConvertSprites(); ScrappedData.Instance.DownloadScrappedData(null); }