public override void OnPreferencesSaved() { Core.InternalSettingsRefresh(); #if QM QuickMenus.QMPrefsRefresh(); #endif }
internal static void InternalSettingsRefresh() { var debugList = new List <string>(); try { s_PostProcessing = MelonPreferences.GetEntryValue <bool>(ModID, "PostProcessing"); s_QuickMenu = MelonPreferences.GetEntryValue <bool>(ModID, "QMToggle"); if (!s_UICreated) { return; //Prevents Errors when other mods call OnPreferencesSaved(); } var ProcessLayer = MainCamera != null ? MainCamera.gameObject != null?MainCamera.gameObject.GetComponent <PostProcessLayer>() : null : null; if (ProcessLayer != null) { ProcessLayer.enabled = s_PostProcessing; } debugList.Add("Camera"); WorldVolumes.WorldQMToggle = MelonPreferences.GetEntryValue <bool>(ModID, "WorldQMToggle"); WorldVolumes.WorldPostProcessing = MelonPreferences.GetEntryValue <bool>(ModID, "WorldPostProcessing"); WorldVolumes.ToggleWorldVolumes(); debugList.Add("Volumes"); if (!CustomPostProcessing.m_ObjectsCreated) { return; } UpdateWeights(); debugList.Add("Weights"); UpdateStates(); debugList.Add("States"); UpdateProfiles(); debugList.Add("Profiles"); #if QM QuickMenus.QMPrefsRefresh(); #endif } catch (Exception e) { MelonLogger.Error(e); MelonLogger.Error("Please Post your Latest.Log in the VRCMG Discord and @Mention arion#1223 Please."); MelonLogger.Error("Debug Dump:"); if (debugList.Count == 0) { MelonLogger.Error("Pre Camera"); return; } foreach (var debugEntry in debugList) { MelonLogger.Error("Entry: " + debugEntry + "Checked."); if (debugEntry == "Profiles") { MelonLogger.Error("QMPrefs!!"); } } } }
public override void VRChat_OnUiManagerInit() { Core.s_UICreated = true; #if QM QuickMenus.InitQM(); #endif MelonCoroutines.Start(Assets.LoadAssets()); CustomPostProcessing.CreateProcessingObjects(); Core.InternalSettingsRefresh(); // Object Sync }
private new static void VRChat_OnUiManagerInit() { Core.s_UICreated = true; Msg("VRChat_OnUiManagerInit Sucessfully Called."); #if QM QuickMenus.InitQM(); #endif Assets.LoadAssets().Coroutine(); CustomPostProcessing.CreateProcessingObjects(); Core.InternalSettingsRefresh(); // Object Sync }