public static ColorScheme GetMainColorScheme()
        {
            ColorSchemesSettings colorSchemesSettings = ReflectionUtil.GetField <PlayerData, PlayerDataModel>(Resources.FindObjectsOfTypeAll <PlayerDataModel>().FirstOrDefault(), "_playerData").colorSchemesSettings;
            ColorScheme          colorScheme          = colorSchemesSettings.GetSelectedColorScheme();

            return(colorScheme);
        }
        public static void ChangeColors()
        {
            colorManager = Resources.FindObjectsOfTypeAll <ColorManager>().FirstOrDefault();

            var playerDataModel = Resources.FindObjectsOfTypeAll <PlayerDataModel>().FirstOrDefault();

            colorSchemesSettings = playerDataModel.playerData.colorSchemesSettings;

            menuLightsManager = Resources.FindObjectsOfTypeAll <MenuLightsManager>().FirstOrDefault();
            bsLightManager    = Resources.FindObjectsOfTypeAll <LightWithIdManager>().FirstOrDefault();

            var overrideColorScheme = colorSchemesSettings.overrideDefaultColors ? colorSchemesSettings.GetSelectedColorScheme() : colorManager.GetField <ColorSchemeSO>("_defaultColorScheme").colorScheme;

            Utils.AdjustColorBW(overrideColorScheme);

            Plugin.Logger.Info("selected:" + overrideColorScheme.colorSchemeName);

            colorManager.SetPrivateField("_colorScheme", overrideColorScheme);

            SetMenuEnvironmentColors(overrideColorScheme);

            SetLogoColors(overrideColorScheme);
            SetMenuPlayersPlaceColors(overrideColorScheme);

            SetPointerColors(overrideColorScheme);

            SetColoredTextIconColors(overrideColorScheme);
            SetColoredImageColors(overrideColorScheme);

            SetSliderColors(overrideColorScheme);
            SetToggleColors(overrideColorScheme);
            SetAnimationClipColors(overrideColorScheme);
            SetButtonColors(overrideColorScheme);
            SetTMPUGUIColors(overrideColorScheme);
            SetMissionToggleColors(overrideColorScheme);
            SetTableCellColors(overrideColorScheme);
            SetFireWorkColors(overrideColorScheme);

            colorManager.Start();
            menuLightsManager.RefreshColors();

            currentColorScheme = overrideColorScheme;

            Plugin.Logger.Info("applied all colors");
        }
        public static void GetMainColorScheme()
        {
            ColorSchemesSettings colorSchemesSettings = ReflectionUtil.GetField <PlayerData, PlayerDataModel>(Resources.FindObjectsOfTypeAll <PlayerDataModel>().FirstOrDefault(), "_playerData").colorSchemesSettings;

            if (colorSchemesSettings == null)
            {
                return;
            }

            ColorScheme curColorScheme = colorSchemesSettings.GetSelectedColorScheme();

            if (curColorScheme == null)
            {
                return;
            }

            VideoMenu.selectedCubeColorLeft  = curColorScheme.saberAColor;
            VideoMenu.selectedCubeColorRight = curColorScheme.saberBColor;
            VideoMenu.selectedEnvColorLeft   = curColorScheme.environmentColor0;
            VideoMenu.selectedEnvColorRight  = curColorScheme.environmentColor1;
        }
        static bool Prefix(Action beforeSceneSwitchCallback, CampaignFlowCoordinator __instance, MissionSelectionNavigationController ____missionSelectionNavigationController, MenuTransitionsHelper ____menuTransitionsHelper, PlayerDataModel ____playerDataModel)
        {
            if (____missionSelectionNavigationController.selectedMissionNode.missionData is CustomMissionDataSO)
            {
                CustomMissionDataSO missionData = ____missionSelectionNavigationController.selectedMissionNode.missionData as CustomMissionDataSO;

                IDifficultyBeatmap     difficultyBeatmap      = BeatmapLevelDataExtensions.GetDifficultyBeatmap(Loader.BeatmapLevelsModelSO.GetBeatmapLevelIfLoaded(missionData.customLevel.levelID).beatmapLevelData, missionData.beatmapCharacteristic, missionData.beatmapDifficulty);
                GameplayModifiers      gameplayModifiers      = missionData.gameplayModifiers;
                MissionObjective[]     missionObjectives      = missionData.missionObjectives;
                PlayerSpecificSettings playerSpecificSettings = ____playerDataModel.playerData.playerSpecificSettings;
                ColorSchemesSettings   colorSchemesSettings   = ____playerDataModel.playerData.colorSchemesSettings;
                ColorScheme            overrideColorScheme    = colorSchemesSettings.overrideDefaultColors ? colorSchemesSettings.GetSelectedColorScheme() : null;
                ____menuTransitionsHelper.StartMissionLevel("", difficultyBeatmap, overrideColorScheme, gameplayModifiers, missionObjectives, playerSpecificSettings, beforeSceneSwitchCallback, __instance.HandleMissionLevelSceneDidFinish);
                return(false);
            }
            return(true);
        }