private IReadOnlyList <TierSettings> GetTierSettings(Version version, Platform platform, TransferInstructionFlags flags)
        {
            if (!IsReadTierSettings(version))
            {
                return(new TierSettings[0]);
            }

            if (IsReadEditorSettings(flags))
            {
                return(TierSettings);
            }

            if (IsReadPlatformSettings(version))
            {
                TierSettings[] settings = new TierSettings[PlatformSettings.Count];
                for (int i = 0; i < PlatformSettings.Count; i++)
                {
                    PlatformShaderSettings psettings = PlatformSettings[i];
                    settings[i] = new TierSettings(psettings, platform, (GraphicsTier)i, version, flags);
                }
                return(settings);
            }
            else
            {
                TierSettings[] settings = new TierSettings[TierGraphicSettings.Count];
                for (int i = 0; i < TierGraphicSettings.Count; i++)
                {
                    TierGraphicsSettings gsettings = TierGraphicSettings[i];
                    settings[i] = new TierSettings(gsettings, platform, (GraphicsTier)i);
                }
                return(settings);
            }
        }
Beispiel #2
0
        private IReadOnlyList <TierSettings> GetTierSettings(Version version, Platform platform, TransferInstructionFlags flags)
        {
            if (!HasTierSettings(version))
            {
                return(System.Array.Empty <TierSettings>());
            }

            if (HasEditorSettings(flags))
            {
                return(TierSettings);
            }

            if (HasPlatformSettings(version))
            {
                TierSettings[] settings = new TierSettings[PlatformSettings.Length];
                for (int i = 0; i < PlatformSettings.Length; i++)
                {
                    PlatformShaderSettings psettings = PlatformSettings[i];
                    settings[i] = new TierSettings(psettings, platform, (GraphicsTier)i, version, flags);
                }
                return(settings);
            }
            else
            {
                TierSettings[] settings = new TierSettings[TierGraphicSettings.Length];
                for (int i = 0; i < TierGraphicSettings.Length; i++)
                {
                    TierGraphicsSettings gsettings = TierGraphicSettings[i];
                    settings[i] = new TierSettings(gsettings, platform, (GraphicsTier)i);
                }
                return(settings);
            }
        }
Beispiel #3
0
            internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier, bool vertical)
            {
                TierSettings tierSettings = EditorGraphicsSettings.GetTierSettings(platform, tier);

                EditorGUI.BeginChangeCheck();
                if (!vertical)
                {
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                }
                tierSettings.standardShaderQuality        = this.ShaderQualityPopup(tierSettings.standardShaderQuality);
                tierSettings.reflectionProbeBoxProjection = EditorGUILayout.Toggle(tierSettings.reflectionProbeBoxProjection, new GUILayoutOption[0]);
                tierSettings.reflectionProbeBlending      = EditorGUILayout.Toggle(tierSettings.reflectionProbeBlending, new GUILayoutOption[0]);
                tierSettings.detailNormalMap        = EditorGUILayout.Toggle(tierSettings.detailNormalMap, new GUILayoutOption[0]);
                tierSettings.semitransparentShadows = EditorGUILayout.Toggle(tierSettings.semitransparentShadows, new GUILayoutOption[0]);
                tierSettings.enableLPPV             = EditorGUILayout.Toggle(tierSettings.enableLPPV, new GUILayoutOption[0]);
                if (!vertical)
                {
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                }
                tierSettings.cascadedShadowMaps    = EditorGUILayout.Toggle(tierSettings.cascadedShadowMaps, new GUILayoutOption[0]);
                tierSettings.prefer32BitShadowMaps = EditorGUILayout.Toggle(tierSettings.prefer32BitShadowMaps, new GUILayoutOption[0]);
                tierSettings.hdr                = EditorGUILayout.Toggle(tierSettings.hdr, new GUILayoutOption[0]);
                tierSettings.hdrMode            = this.HDRModePopup(tierSettings.hdrMode);
                tierSettings.renderingPath      = this.RenderingPathPopup(tierSettings.renderingPath);
                tierSettings.realtimeGICPUUsage = this.RealtimeGICPUUsagePopup(tierSettings.realtimeGICPUUsage);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
                    EditorGraphicsSettings.SetTierSettings(platform, tier, tierSettings);
                }
            }
Beispiel #4
0
        public static string PerformAndroidBuild(string apkName, bool isDevelopment = true, bool isIL2CPP = false, bool exportASProject = false)
        {
            BuildOptions opt = BuildOptions.None;

            if (isDevelopment)
            {
                opt = BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.ConnectWithProfiler;
            }
            if (isIL2CPP)
            {
                PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isDevelopment ? Il2CppCompilerConfiguration.Debug : Il2CppCompilerConfiguration.Release);
                PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.IL2CPP);
                PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARMv7 | AndroidArchitecture.ARM64;
            }
            else
            {
                PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.Mono2x);
                //x86是平板和安卓模拟器
                PlayerSettings.Android.targetArchitectures = AndroidArchitecture.All;
            }

            if (exportASProject)
            {
                opt = opt | BuildOptions.AcceptExternalModificationsToPlayer;
                EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
            }
            //export android studio project,use gradle to build apk
            EditorUserBuildSettings.exportAsGoogleAndroidProject = exportASProject;

            //settings
            EditorUserBuildSettings.development             = isDevelopment;
            EditorUserBuildSettings.androidCreateSymbolsZip = true;
            PlayerSettings.Android.forceSDCardPermission    = true; //申请工信部版号时,可关闭
            PlayerSettings.Android.forceInternetPermission  = true;
            PlayerSettings.Android.renderOutsideSafeArea    = true; //刘海屏
            PlayerSettings.Android.startInFullscreen        = true;
            PlayerSettings.stripEngineCode = false;
            PlayerSettings.SetManagedStrippingLevel(BuildTargetGroup.Android, ManagedStrippingLevel.Disabled);

            //render settings
#if UNITY_2017_1_OR_NEWER
            //PlayerSettings.colorSpace = ColorSpace.Linear;
            //PlayerSettings.gpuSkinning = true;
            //opengl 3

            /*PlayerSettings.SetGraphicsAPIs(BuildTarget.Android,new GraphicsDeviceType[]{UnityEngine.Rendering.GraphicsDeviceType.OpenGLES3});
             * PlayerSettings.openGLRequireES31 = false;
             * PlayerSettings.openGLRequireES31AEP = false;*/

            UnityEditor.Rendering.TierSettings ts = new TierSettings();
            ts.hdr                = true;
            ts.hdrMode            = CameraHDRMode.R11G11B10;
            ts.renderingPath      = RenderingPath.Forward;
            ts.realtimeGICPUUsage = RealtimeGICPUUsage.Low;
            UnityEditor.Rendering.EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Android, UnityEngine.Rendering.GraphicsTier.Tier3, ts);
#endif

            string path = exportASProject ? $"Apps/Android/{apkName}" : $"Apps/Android/{apkName}.apk";
            return(PerformBuild(path, BuildTargetGroup.Android, BuildTarget.Android, opt));
        }
Beispiel #5
0
        public static void PerformiOSBuild()
        {
            //apple store need x64
            PlayerSettings.SetScriptingBackend(BuildTargetGroup.iOS, ScriptingImplementation.IL2CPP);
            PlayerSettings.stripEngineCode = false;
            PlayerSettings.SetManagedStrippingLevel(BuildTargetGroup.iOS, ManagedStrippingLevel.Disabled); //不裁剪代码
            PlayerSettings.applicationIdentifier      = "com.github.ksframework";                          //todo read from config or param to fill appid
            PlayerSettings.iOS.scriptCallOptimization = ScriptCallOptimizationLevel.SlowAndSafe;
            PlayerSettings.iOS.targetDevice           = iOSTargetDevice.iPhoneAndiPad;

            //todo custom you project render settings
            #if UNITY_2017_1_OR_NEWER
            //PlayerSettings.colorSpace = ColorSpace.Gamma;
            //PlayerSettings.gpuSkinning = true;
            PlayerSettings.SetGraphicsAPIs(BuildTarget.iOS, new GraphicsDeviceType[] { UnityEngine.Rendering.GraphicsDeviceType.Metal });
            UnityEditor.Rendering.TierSettings ts = new TierSettings();
            ts.hdr                = true;
            ts.hdrMode            = CameraHDRMode.R11G11B10;
            ts.renderingPath      = RenderingPath.Forward;
            ts.realtimeGICPUUsage = RealtimeGICPUUsage.Low;
            UnityEditor.Rendering.EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.iOS, UnityEngine.Rendering.GraphicsTier.Tier3, ts);
            #endif

            PerformiOSBuild("KSFramework", false);
        }
Beispiel #6
0
        public static void SetAndroidProjectSetting()
        {
            //TODO 勾选PlayerSettings中的dynamicBatching 没找到代码设置API 目前手动设置
            PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android,
                                                             "FAIRYGUI_TOLUA;FAIRYGUI_TEST;UNITY_POST_PROCESSING_STACK_V2;PROJECT_DEBUG");
            //设置HDR
            TierSettings settings = new TierSettings();

            settings.standardShaderQuality = ShaderQuality.Medium;
            settings.hdr                = true;
            settings.hdrMode            = CameraHDRMode.R11G11B10;
            settings.renderingPath      = RenderingPath.DeferredShading;
            settings.realtimeGICPUUsage = RealtimeGICPUUsage.Low;
            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Android, GraphicsTier.Tier2, settings);
        }
Beispiel #7
0
            internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier)
            {
                TierSettings tierSettings = EditorGraphicsSettings.GetTierSettings(platform, tier);

                EditorGUI.BeginChangeCheck();
                tierSettings.cascadedShadowMaps           = EditorGUILayout.Toggle(tierSettings.cascadedShadowMaps, new GUILayoutOption[0]);
                tierSettings.standardShaderQuality        = this.ShaderQualityPopup(tierSettings.standardShaderQuality);
                tierSettings.reflectionProbeBoxProjection = EditorGUILayout.Toggle(tierSettings.reflectionProbeBoxProjection, new GUILayoutOption[0]);
                tierSettings.reflectionProbeBlending      = EditorGUILayout.Toggle(tierSettings.reflectionProbeBlending, new GUILayoutOption[0]);
                tierSettings.renderingPath = this.RenderingPathPopup(tierSettings.renderingPath);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
                    EditorGraphicsSettings.SetTierSettings(platform, tier, tierSettings);
                }
            }
Beispiel #8
0
        public static void SetGraphicsTier(int i)
        {
            TierSettings ts = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Android, (GraphicsTier)i);

            ts.standardShaderQuality        = ShaderQuality.High;
            ts.reflectionProbeBoxProjection = false;
            ts.reflectionProbeBlending      = false;
            ts.detailNormalMap        = false;
            ts.semitransparentShadows = false;
            ts.enableLPPV             = false;
            ts.cascadedShadowMaps     = false;
            ts.prefer32BitShadowMaps  = false;
            ts.hdr                = false;
            ts.renderingPath      = RenderingPath.Forward;
            ts.realtimeGICPUUsage = RealtimeGICPUUsage.Low;
            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Android, (GraphicsTier)i, ts);
        }
        public bool GraphicsUsingDeferredRendering()
        {
            for (int btIdx = 0; btIdx < _buildTargets.Length; ++btIdx)
            {
                for (int tierIdx = 0; tierIdx < _graphicsTiers.Length; ++tierIdx)
                {
                    TierSettings tierSettings =
                        EditorGraphicsSettings.GetTierSettings(_buildTargets[btIdx], _graphicsTiers[tierIdx]);

                    if (tierSettings.renderingPath == RenderingPath.DeferredShading)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
        public bool GraphicsMixedStandardShaderQuality()
        {
            for (int btIdx = 0; btIdx < _buildTargets.Length; ++btIdx)
            {
                ShaderQuality ssq = EditorGraphicsSettings.GetTierSettings(_buildTargets[btIdx], _graphicsTiers[0]).standardShaderQuality;
                for (int tierIdx = 0; tierIdx < _graphicsTiers.Length; ++tierIdx)
                {
                    TierSettings tierSettings =
                        EditorGraphicsSettings.GetTierSettings(_buildTargets[btIdx], _graphicsTiers[tierIdx]);

                    if (tierSettings.standardShaderQuality != ssq)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Beispiel #11
0
        public static bool CheckGraphicsTier(int i)
        {
            bool         flag = true;
            TierSettings ts   = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Android, (GraphicsTier)i);

            flag &= ts.standardShaderQuality == ShaderQuality.High;
            flag &= ts.reflectionProbeBoxProjection == false;
            flag &= ts.reflectionProbeBlending == false;
            flag &= ts.detailNormalMap == false;
            flag &= ts.semitransparentShadows == false;
            flag &= ts.enableLPPV == false;
            flag &= ts.cascadedShadowMaps == false;
            flag &= ts.prefer32BitShadowMaps == false;
            flag &= ts.hdr == false;
            flag &= ts.renderingPath == RenderingPath.Forward;
            flag &= ts.realtimeGICPUUsage == RealtimeGICPUUsage.Low;
            return(flag);
        }
Beispiel #12
0
        /// <summary>
        /// グラフィック設定
        /// </summary>
        private static void GraphicsSetting()
        {
            TierSettings tier1Settings = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier1);
            TierSettings tier2Settings = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier2);
            TierSettings tier3Settings = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier3);

            tier1Settings.standardShaderQuality = ShaderQuality.Low;
            tier1Settings.renderingPath         = RenderingPath.VertexLit;

            tier2Settings.standardShaderQuality = ShaderQuality.Medium;
            tier2Settings.renderingPath         = RenderingPath.VertexLit;

            tier3Settings.standardShaderQuality = ShaderQuality.High;
            tier3Settings.renderingPath         = RenderingPath.VertexLit;

            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier1, tier1Settings);
            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier2, tier2Settings);
            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier3, tier3Settings);
        }
Beispiel #13
0
    protected void DrawGUI(bool isIntegrated = false)
    {
        serializedObject.Update();

        SetStyles();

        EditorGUILayout.BeginVertical();
        {
            // header
            GUILayout.Space(10.0f);
            GUILayout.Label(m_HBAOTex, m_TitleLabelStyle, GUILayout.ExpandWidth(true));

            //if (m_HBAO.GetComponents<MonoBehaviour>()[0] != m_HBAO)
            //{
            //GUILayout.Space(6.0f);
            //EditorGUILayout.HelpBox("This Post FX should be one of the first in your effect stack", MessageType.Info);
            //}

            Event e = Event.current;

            // settings groups
            foreach (var group in m_GroupFields)
            {
                var groupProperty = serializedObject.FindProperty(group.Key.Name);
                if (groupProperty == null)
                {
                    continue;
                }

                GUILayout.Space(6.0f);
                Rect rect = GUILayoutUtility.GetRect(16f, 22f, m_SettingsGroupStyle);
                GUI.Box(rect, ObjectNames.NicifyVariableName(groupProperty.displayName), m_SettingsGroupStyle);
                if (e.type == EventType.MouseDown && rect.Contains(e.mousePosition))
                {
                    groupProperty.isExpanded = !groupProperty.isExpanded;
                    e.Use();
                }

                if (!groupProperty.isExpanded)
                {
                    continue;
                }

                // presets is a special case
                if (group.Key.FieldType == typeof(HBAO_Core.Presets))
                {
                    GUILayout.Space(6.0f);
                    m_SelectedPreset = GUILayout.SelectionGrid(m_SelectedPreset, m_Presets.Values.Select(x => ObjectNames.NicifyVariableName(x.ToString())).ToArray(), 3);
                    GUILayout.Space(6.0f);
                    if (GUILayout.Button("Apply Preset"))
                    {
                        m_HBAO.ApplyPreset(m_Presets[m_SelectedPreset]);
                        EditorUtility.SetDirty(target);
                        if (!EditorApplication.isPlaying)
                        {
#if (UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
                            EditorApplication.MarkSceneDirty();
#else
                            UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene());
#endif
                        }
                    }
                }

                foreach (var field in group.Value)
                {
                    // hide real presets
                    if (group.Key.FieldType == typeof(HBAO_Core.Presets))
                    {
                        continue;
                    }

                    // hide integrationStage for legacy HBAO
                    if (group.Key.FieldType == typeof(HBAO_Core.GeneralSettings) && field.name == "integrationStage")
                    {
                        if (!isIntegrated)
                        {
                            continue;
                        }
                    }

                    // hide resolution when deinterleaved HBAO is on
                    if (group.Key.FieldType == typeof(HBAO_Core.GeneralSettings) && field.name == "resolution")
                    {
                        if (m_HBAO.generalSettings.deinterleaving != HBAO_Core.Deinterleaving.Disabled)
                        {
                            continue;
                        }
                    }
                    // warn about deinterleaving not supported with SPSR
                    else if (group.Key.FieldType == typeof(HBAO_Core.GeneralSettings) && field.name == "displayMode")
                    {
#if UNITY_2019_3_OR_NEWER
                        if (m_HBAO.generalSettings.deinterleaving != HBAO_Core.Deinterleaving.Disabled &&
                            IsVrRunning() && PlayerSettings.stereoRenderingPath == StereoRenderingPath.SinglePass)
                        {
                            GUILayout.Space(6.0f);
                            EditorGUILayout.HelpBox("Deinterleaving is not supported with Single Pass Stereo Rendering...", MessageType.Warning);
                        }
#elif UNITY_5_5_OR_NEWER
                        if (m_HBAO.generalSettings.deinterleaving != HBAO_Core.Deinterleaving.Disabled &&
                            PlayerSettings.virtualRealitySupported && PlayerSettings.stereoRenderingPath == StereoRenderingPath.SinglePass)
                        {
                            GUILayout.Space(6.0f);
                            EditorGUILayout.HelpBox("Deinterleaving is not supported with Single Pass Stereo Rendering...", MessageType.Warning);
                        }
#elif UNITY_5_4
                        if (m_HBAO.generalSettings.deinterleaving != HBAO_Core.Deinterleaving.Disabled &&
                            PlayerSettings.virtualRealitySupported && PlayerSettings.singlePassStereoRendering)
                        {
                            GUILayout.Space(6.0f);
                            EditorGUILayout.HelpBox("Deinterleaving is not supported with Single Pass Stereo Rendering...", MessageType.Warning);
                        }
#endif
                    }
                    // hide noise type when deinterleaved HBAO is on
                    else if (group.Key.FieldType == typeof(HBAO_Core.GeneralSettings) && field.name == "noiseType")
                    {
                        if (m_HBAO.generalSettings.deinterleaving != HBAO_Core.Deinterleaving.Disabled)
                        {
                            continue;
                        }
                    }
#if !(UNITY_5_1 || UNITY_5_0)
                    // hide useMultiBounce setting in BeforeReflections integration stage
                    else if (group.Key.FieldType == typeof(HBAO_Core.AOSettings) && field.name == "useMultiBounce")
                    {
                        if (m_HBAO.generalSettings.integrationStage == HBAO_Core.IntegrationStage.BeforeReflections)
                        {
                            continue;
                        }
                    }
#endif
                    // hide multiBounceInfluence setting when not used
                    else if (group.Key.FieldType == typeof(HBAO_Core.AOSettings) && field.name == "multiBounceInfluence")
                    {
#if !(UNITY_5_1 || UNITY_5_0)
                        if (m_HBAO.generalSettings.integrationStage == HBAO_Core.IntegrationStage.BeforeReflections)
                        {
                            continue;
                        }
#endif
                        if (!m_HBAO.aoSettings.useMultiBounce)
                        {
                            continue;
                        }
                    }
                    // warn about distance falloff greater than max distance
                    else if (group.Key.FieldType == typeof(HBAO_Core.AOSettings) && field.name == "perPixelNormals")
                    {
                        if (m_HBAO.aoSettings.distanceFalloff > m_HBAO.aoSettings.maxDistance)
                        {
                            GUILayout.Space(6.0f);
                            EditorGUILayout.HelpBox("Distance Falloff shoudn't be superior to Max Distance", MessageType.Warning);
                        }
                    }
                    // hide albedoMultiplier when not in deferred
                    else if (group.Key.FieldType == typeof(HBAO_Core.ColorBleedingSettings) && field.name == "albedoMultiplier")
                    {
#if UNITY_5_5_OR_NEWER
                        RenderingPath renderingPath = m_HBAO.GetComponent <Camera>().renderingPath;
                        TierSettings  tierSettings  = EditorGraphicsSettings.GetTierSettings(EditorUserBuildSettings.selectedBuildTargetGroup, Graphics.activeTier);
                        if (renderingPath != RenderingPath.DeferredShading &&
                            (renderingPath != RenderingPath.UsePlayerSettings ||
                             tierSettings.renderingPath != RenderingPath.DeferredShading))
                        {
                            continue;
                        }
#else
                        RenderingPath renderingPath = m_HBAO.GetComponent <Camera>().renderingPath;
                        if (renderingPath != RenderingPath.DeferredShading &&
                            (renderingPath != RenderingPath.UsePlayerSettings ||
                             PlayerSettings.renderingPath != RenderingPath.DeferredShading))
                        {
                            continue;
                        }
#endif
                    }

                    EditorGUILayout.BeginHorizontal();
                    GUILayout.Space(12.0f);
                    EditorGUILayout.PropertyField(field);
                    EditorGUILayout.EndHorizontal();
                }
            }
        }
        EditorGUILayout.EndVertical();

        serializedObject.ApplyModifiedProperties();
    }
Beispiel #14
0
        private void OnGUI()
        {
            using (new GUILayout.VerticalScope())
            {
                if (downloadReady && !m_CoverImage)
                {
                    Texture2D tex = new Texture2D(580, 128);
                    tex.LoadImage(imageData);
                    m_CoverImage = tex;
                    downloader.Abort();
                }

                if (m_CoverImage)
                {
                    GUI.DrawTexture(new Rect(0, 0, 580, 128), m_CoverImage, ScaleMode.StretchToFill, true, 10.0f);
                    GUILayout.Space(138);
                }
                else
                {
                    GUILayout.Space(32);
                }

                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();
                    GUILayout.Label("FPS Builder", Styling.headerLabel);
                    GUILayout.FlexibleSpace();
                }

                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();
                    GUILayout.Label("The ultimate solution for modern first-person shooter games.");
                    GUILayout.FlexibleSpace();
                }

                GUILayout.Space(32);

                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();

                    if (GUILayout.Button("Getting Started", GUILayout.Width(160)))
                    {
                        Application.OpenURL("https://docs.gamebuilders.com.br/manual/fps-builder/getting-started.html");
                    }

                    GUILayout.FlexibleSpace();
                }

                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();

                    if (GUILayout.Button("Online Documentation", GUILayout.Width(160)))
                    {
                        Application.OpenURL("https://docs.gamebuilders.com.br/");
                    }

                    GUILayout.FlexibleSpace();
                }

                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();

                    if (GUILayout.Button("Support E-mail", GUILayout.Width(160)))
                    {
                        Application.OpenURL("mailto:[email protected]");

                        TextEditor textEditor = new TextEditor
                        {
                            text = "*****@*****.**"
                        };
                        textEditor.SelectAll();
                        textEditor.Copy();

                        Debug.Log("Support E-mail copied to clipboard.");
                    }

                    GUILayout.FlexibleSpace();
                }

                /*using (new GUILayout.HorizontalScope())
                 * {
                 *  GUILayout.FlexibleSpace();
                 *
                 *  if (GUILayout.Button("Forums", GUILayout.Width(160)))
                 *  {
                 *      Application.OpenURL("");
                 *  }
                 *
                 *  GUILayout.FlexibleSpace();
                 * }*/

                GUILayout.Space(32);
                using (new GUILayout.VerticalScope())
                {
                    bool fix_tagsAndLayers = !TagExists("Ammo") || !TagExists("Adrenaline Pack") || !LayerExists("Viewmodel") || !LayerExists("Post-Processing");
                    bool fix_colorSpace    = PlayerSettings.colorSpace != ColorSpace.Linear;
                    bool fix_renderingPath = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier1).renderingPath != RenderingPath.DeferredShading ||
                                             EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier2).renderingPath != RenderingPath.DeferredShading ||
                                             EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier3).renderingPath != RenderingPath.DeferredShading;

                    bool fix_packages = CheckForPackagesMissing();

                    if (m_ListRequest != null && m_ListRequest.Status == StatusCode.InProgress)
                    {
                        EditorGUILayout.HelpBox("Checking project status...", MessageType.Info);
                    }
                    else
                    {
                        if (fix_tagsAndLayers || fix_colorSpace || fix_renderingPath || fix_packages)
                        {
                            using (new GUILayout.VerticalScope())
                            {
                                EditorGUILayout.HelpBox(
                                    (fix_tagsAndLayers
                                        ? "There are Tags/Layers missing in the project \n"
                                        : string.Empty)
                                    + (fix_colorSpace ? "Use Linear Color Space \n" : string.Empty)
                                    + (fix_renderingPath ? "Use Deferred Rendering Path \n" : string.Empty)
                                    + (fix_packages ? "There are Packages Missing in your project" : string.Empty),
                                    MessageType.Warning);

                                using (new GUILayout.HorizontalScope())
                                {
                                    GUILayout.FlexibleSpace();
                                    if (GUILayout.Button("Fix now", GUILayout.Width(160)))
                                    {
                                        if (!TagExists("Ammo"))
                                        {
                                            AddTag("Ammo");
                                        }

                                        if (!TagExists("Adrenaline Pack"))
                                        {
                                            AddTag("Adrenaline Pack");
                                        }

                                        if (!LayerExists("Post-Processing"))
                                        {
                                            AddLayer("Post-Processing");
                                        }

                                        if (!LayerExists("Viewmodel"))
                                        {
                                            AddLayer("Viewmodel");
                                        }

                                        if (PlayerSettings.colorSpace != ColorSpace.Linear)
                                        {
                                            PlayerSettings.colorSpace = ColorSpace.Linear;
                                            Debug.Log("Changed color space to Linear");
                                        }

                                        if (fix_packages)
                                        {
                                            m_AddRequest = Client.Add("com.unity.postprocessing");
                                            Debug.Log("Adding 'com.unity.postprocessing' package.");
                                        }

                                        TierSettings tier1 =
                                            EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier1);
                                        if (tier1.renderingPath != RenderingPath.DeferredShading)
                                        {
                                            tier1.renderingPath = RenderingPath.DeferredShading;
                                            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier1, tier1);
                                            Debug.Log("Changed Graphics Tier 1 Rendering Path to Deferred");
                                        }

                                        TierSettings tier2 =
                                            EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier2);
                                        if (tier2.renderingPath != RenderingPath.DeferredShading)
                                        {
                                            tier2.renderingPath = RenderingPath.DeferredShading;
                                            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier2, tier2);
                                            Debug.Log("Changed Graphics Tier 2 Rendering Path to Deferred");
                                        }

                                        TierSettings tier3 =
                                            EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier3);
                                        if (tier3.renderingPath != RenderingPath.DeferredShading)
                                        {
                                            tier3.renderingPath = RenderingPath.DeferredShading;
                                            EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone,
                                                                                   GraphicsTier.Tier3, tier3);
                                            Debug.Log("Changed Graphics Tier 3 Rendering Path to Deferred");
                                        }
                                    }
                                    GUILayout.FlexibleSpace();
                                }
                            }
                        }
                    }
                }
                GUILayout.FlexibleSpace();

                m_ShowAtStartup = EditorPrefs.GetInt("showDialogAtStartup", 1) > 0;
                using (new GUILayout.HorizontalScope())
                {
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.LabelField("Version 1.0.3");
                    GUILayout.FlexibleSpace();
                    m_ShowAtStartup = EditorGUILayout.ToggleLeft("Show At Startup", m_ShowAtStartup);
                }

                EditorPrefs.SetInt("showDialogAtStartup", m_ShowAtStartup ? 1 : 0);

                GUILayout.Space(5);
            }
        }
Beispiel #15
0
    public void OnGUI()
    {
        //var resourcePath = GetResourcePath();
        //var logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
        //var rect = GUILayoutUtility.GetRect(position.width, 150, GUI.skin.box);
        //if (logo)
        //	GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);

        EditorGUILayout.HelpBox("Recommended project settings for The Lab Renderer:", MessageType.Warning);

        scrollPosition = GUILayout.BeginScrollView(scrollPosition);

        int numItems = 0;

        if (!EditorPrefs.HasKey(ignore + buildTarget) &&
            EditorUserBuildSettings.activeBuildTarget != recommended_BuildTarget)
        {
            ++numItems;

            GUILayout.Label(buildTarget + string.Format(currentValue, EditorUserBuildSettings.activeBuildTarget));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_BuildTarget)))
            {
                EditorUserBuildSettings.SwitchActiveBuildTarget(recommended_BuildTarget);
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + buildTarget, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + showUnitySplashScreen) &&
            PlayerSettings.SplashScreen.show != recommended_ShowUnitySplashScreen)
        {
            ++numItems;

            GUILayout.Label(showUnitySplashScreen + string.Format(currentValue, PlayerSettings.SplashScreen.show));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_ShowUnitySplashScreen)))
            {
                PlayerSettings.SplashScreen.show = recommended_ShowUnitySplashScreen;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + showUnitySplashScreen, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen) &&
            PlayerSettings.defaultIsFullScreen != recommended_DefaultIsFullScreen)
        {
            ++numItems;

            GUILayout.Label(defaultIsFullScreen + string.Format(currentValue, PlayerSettings.defaultIsFullScreen));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_DefaultIsFullScreen)))
            {
                PlayerSettings.defaultIsFullScreen = recommended_DefaultIsFullScreen;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + defaultIsFullScreen, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + defaultScreenSize) &&
            (PlayerSettings.defaultScreenWidth != recommended_DefaultScreenWidth ||
             PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight))
        {
            ++numItems;

            GUILayout.Label(defaultScreenSize + string.Format(" ({0}x{1})", PlayerSettings.defaultScreenWidth, PlayerSettings.defaultScreenHeight));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format("Use recommended ({0}x{1})", recommended_DefaultScreenWidth, recommended_DefaultScreenHeight)))
            {
                PlayerSettings.defaultScreenWidth  = recommended_DefaultScreenWidth;
                PlayerSettings.defaultScreenHeight = recommended_DefaultScreenHeight;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + defaultScreenSize, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + runInBackground) &&
            PlayerSettings.runInBackground != recommended_RunInBackground)
        {
            ++numItems;

            GUILayout.Label(runInBackground + string.Format(currentValue, PlayerSettings.runInBackground));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_RunInBackground)))
            {
                PlayerSettings.runInBackground = recommended_RunInBackground;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + runInBackground, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + displayResolutionDialog) &&
            PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
        {
            ++numItems;

            GUILayout.Label(displayResolutionDialog + string.Format(currentValue, PlayerSettings.displayResolutionDialog));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_DisplayResolutionDialog)))
            {
                PlayerSettings.displayResolutionDialog = recommended_DisplayResolutionDialog;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + displayResolutionDialog, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + resizableWindow) &&
            PlayerSettings.resizableWindow != recommended_ResizableWindow)
        {
            ++numItems;

            GUILayout.Label(resizableWindow + string.Format(currentValue, PlayerSettings.resizableWindow));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_ResizableWindow)))
            {
                PlayerSettings.resizableWindow = recommended_ResizableWindow;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + resizableWindow, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + fullscreenMode) &&
            PlayerSettings.d3d11FullscreenMode != recommended_FullscreenMode)
        {
            ++numItems;

            GUILayout.Label(fullscreenMode + string.Format(currentValue, PlayerSettings.d3d11FullscreenMode));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_FullscreenMode)))
            {
                PlayerSettings.d3d11FullscreenMode = recommended_FullscreenMode;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + fullscreenMode, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + visibleInBackground) &&
            PlayerSettings.visibleInBackground != recommended_VisibleInBackground)
        {
            ++numItems;

            GUILayout.Label(visibleInBackground + string.Format(currentValue, PlayerSettings.visibleInBackground));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_VisibleInBackground)))
            {
                PlayerSettings.visibleInBackground = recommended_VisibleInBackground;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + visibleInBackground, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + renderingPath) &&
            EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier).renderingPath != recommended_RenderPath)
        {
            ++numItems;

            GUILayout.Label(renderingPath + string.Format(currentValue, EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier).renderingPath));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_RenderPath) + " - required for MSAA"))
            {
                TierSettings settings = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier);
                settings.renderingPath = recommended_RenderPath;

                EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier, settings);
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + renderingPath, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + colorSpace) &&
            PlayerSettings.colorSpace != recommended_ColorSpace)
        {
            ++numItems;

            GUILayout.Label(colorSpace + string.Format(currentValue, PlayerSettings.colorSpace));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_ColorSpace) + " - requires reloading scene"))
            {
                PlayerSettings.colorSpace = recommended_ColorSpace;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + colorSpace, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + gpuSkinning) &&
            PlayerSettings.gpuSkinning != recommended_GpuSkinning)
        {
            ++numItems;

            GUILayout.Label(gpuSkinning + string.Format(currentValue, PlayerSettings.gpuSkinning));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_GpuSkinning)))
            {
                PlayerSettings.gpuSkinning = recommended_GpuSkinning;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + gpuSkinning, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + shadowCascades) &&
            QualitySettings.shadowCascades != recommended_shadowCascades)
        {
            ++numItems;

            GUILayout.Label(shadowCascades + string.Format(currentValue, QualitySettings.shadowCascades));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_shadowCascades)))
            {
                QualitySettings.shadowCascades = recommended_shadowCascades;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + shadowCascades, true);
            }

            GUILayout.EndHorizontal();
        }

        if (!EditorPrefs.HasKey(ignore + pixelLightCount) &&
            QualitySettings.pixelLightCount != recommended_pixelLightCount)
        {
            ++numItems;

            GUILayout.Label(pixelLightCount + string.Format(currentValue, QualitySettings.pixelLightCount));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_pixelLightCount)))
            {
                QualitySettings.pixelLightCount = recommended_pixelLightCount;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + pixelLightCount, true);
            }

            GUILayout.EndHorizontal();
        }

#if false
        if (!EditorPrefs.HasKey(ignore + singlePassStereoRendering) &&
            PlayerSettings.singlePassStereoRendering != recommended_SinglePassStereoRendering)
        {
            ++numItems;

            GUILayout.Label(singlePassStereoRendering + string.Format(currentValue, PlayerSettings.singlePassStereoRendering));

            GUILayout.BeginHorizontal();

            if (GUILayout.Button(string.Format(useRecommended, recommended_SinglePassStereoRendering)))
            {
                PlayerSettings.singlePassStereoRendering = recommended_SinglePassStereoRendering;
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Ignore"))
            {
                EditorPrefs.SetBool(ignore + singlePassStereoRendering, true);
            }

            GUILayout.EndHorizontal();
        }
#endif

        GUILayout.BeginHorizontal();

        GUILayout.FlexibleSpace();

        if (GUILayout.Button("Clear All Ignores"))
        {
            EditorPrefs.DeleteKey(ignore + buildTarget);
            EditorPrefs.DeleteKey(ignore + showUnitySplashScreen);
            EditorPrefs.DeleteKey(ignore + defaultIsFullScreen);
            EditorPrefs.DeleteKey(ignore + defaultScreenSize);
            EditorPrefs.DeleteKey(ignore + runInBackground);
            EditorPrefs.DeleteKey(ignore + displayResolutionDialog);
            EditorPrefs.DeleteKey(ignore + resizableWindow);
            EditorPrefs.DeleteKey(ignore + fullscreenMode);
            EditorPrefs.DeleteKey(ignore + visibleInBackground);
            EditorPrefs.DeleteKey(ignore + renderingPath);
            EditorPrefs.DeleteKey(ignore + colorSpace);
            EditorPrefs.DeleteKey(ignore + gpuSkinning);
            EditorPrefs.DeleteKey(ignore + shadowCascades);
            EditorPrefs.DeleteKey(ignore + pixelLightCount);
#if false
            EditorPrefs.DeleteKey(ignore + singlePassStereoRendering);
#endif
        }

        GUILayout.EndHorizontal();

        GUILayout.EndScrollView();

        GUILayout.FlexibleSpace();

        GUILayout.BeginHorizontal();

        if (numItems > 0)
        {
            if (GUILayout.Button("Accept All"))
            {
                // Only set those that have not been explicitly ignored.
                if (!EditorPrefs.HasKey(ignore + buildTarget))
                {
                    EditorUserBuildSettings.SwitchActiveBuildTarget(recommended_BuildTarget);
                }
                if (!EditorPrefs.HasKey(ignore + showUnitySplashScreen))
                {
                    PlayerSettings.SplashScreen.show = recommended_ShowUnitySplashScreen;
                }
                if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen))
                {
                    PlayerSettings.defaultIsFullScreen = recommended_DefaultIsFullScreen;
                }
                if (!EditorPrefs.HasKey(ignore + defaultScreenSize))
                {
                    PlayerSettings.defaultScreenWidth  = recommended_DefaultScreenWidth;
                    PlayerSettings.defaultScreenHeight = recommended_DefaultScreenHeight;
                }
                if (!EditorPrefs.HasKey(ignore + runInBackground))
                {
                    PlayerSettings.runInBackground = recommended_RunInBackground;
                }
                if (!EditorPrefs.HasKey(ignore + displayResolutionDialog))
                {
                    PlayerSettings.displayResolutionDialog = recommended_DisplayResolutionDialog;
                }
                if (!EditorPrefs.HasKey(ignore + resizableWindow))
                {
                    PlayerSettings.resizableWindow = recommended_ResizableWindow;
                }
                if (!EditorPrefs.HasKey(ignore + fullscreenMode))
                {
                    PlayerSettings.d3d11FullscreenMode = recommended_FullscreenMode;
                }
                if (!EditorPrefs.HasKey(ignore + visibleInBackground))
                {
                    PlayerSettings.visibleInBackground = recommended_VisibleInBackground;
                }
                if (!EditorPrefs.HasKey(ignore + renderingPath))
                {
                    TierSettings settings = EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier);
                    settings.renderingPath = recommended_RenderPath;

                    EditorGraphicsSettings.SetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier, settings);
                }
                if (!EditorPrefs.HasKey(ignore + colorSpace))
                {
                    PlayerSettings.colorSpace = recommended_ColorSpace;
                }
                if (!EditorPrefs.HasKey(ignore + gpuSkinning))
                {
                    PlayerSettings.gpuSkinning = recommended_GpuSkinning;
                }
                if (!EditorPrefs.HasKey(ignore + shadowCascades))
                {
                    QualitySettings.shadowCascades = recommended_shadowCascades;
                }
                if (!EditorPrefs.HasKey(ignore + pixelLightCount))
                {
                    QualitySettings.pixelLightCount = recommended_pixelLightCount;
                }
#if false
                if (!EditorPrefs.HasKey(ignore + singlePassStereoRendering))
                {
                    PlayerSettings.singlePassStereoRendering = recommended_SinglePassStereoRendering;
                }
#endif

                EditorUtility.DisplayDialog("Accept All", "You made the right choice!", "Ok");

                Close();
            }

            if (GUILayout.Button("Ignore All"))
            {
                if (EditorUtility.DisplayDialog("Ignore All", "Are you sure?", "Yes, Ignore All", "Cancel"))
                {
                    // Only ignore those that do not currently match our recommended settings.
                    if (EditorUserBuildSettings.activeBuildTarget != recommended_BuildTarget)
                    {
                        EditorPrefs.SetBool(ignore + buildTarget, true);
                    }
                    if (PlayerSettings.SplashScreen.show != recommended_ShowUnitySplashScreen)
                    {
                        EditorPrefs.SetBool(ignore + showUnitySplashScreen, true);
                    }
                    if (PlayerSettings.defaultIsFullScreen != recommended_DefaultIsFullScreen)
                    {
                        EditorPrefs.SetBool(ignore + defaultIsFullScreen, true);
                    }
                    if (PlayerSettings.defaultScreenWidth != recommended_DefaultScreenWidth ||
                        PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight)
                    {
                        EditorPrefs.SetBool(ignore + defaultScreenSize, true);
                    }
                    if (PlayerSettings.runInBackground != recommended_RunInBackground)
                    {
                        EditorPrefs.SetBool(ignore + runInBackground, true);
                    }
                    if (PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
                    {
                        EditorPrefs.SetBool(ignore + displayResolutionDialog, true);
                    }
                    if (PlayerSettings.resizableWindow != recommended_ResizableWindow)
                    {
                        EditorPrefs.SetBool(ignore + resizableWindow, true);
                    }
                    if (PlayerSettings.d3d11FullscreenMode != recommended_FullscreenMode)
                    {
                        EditorPrefs.SetBool(ignore + fullscreenMode, true);
                    }
                    if (PlayerSettings.visibleInBackground != recommended_VisibleInBackground)
                    {
                        EditorPrefs.SetBool(ignore + visibleInBackground, true);
                    }
                    if (EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, Graphics.activeTier).renderingPath != recommended_RenderPath)
                    {
                        EditorPrefs.SetBool(ignore + renderingPath, true);
                    }
                    if (PlayerSettings.colorSpace != recommended_ColorSpace)
                    {
                        EditorPrefs.SetBool(ignore + colorSpace, true);
                    }
                    if (PlayerSettings.gpuSkinning != recommended_GpuSkinning)
                    {
                        EditorPrefs.SetBool(ignore + gpuSkinning, true);
                    }
                    if (QualitySettings.shadowCascades != recommended_shadowCascades)
                    {
                        EditorPrefs.SetBool(ignore + shadowCascades, true);
                    }
                    if (QualitySettings.pixelLightCount != recommended_pixelLightCount)
                    {
                        EditorPrefs.SetBool(ignore + pixelLightCount, true);
                    }
#if false
                    if (PlayerSettings.singlePassStereoRendering != recommended_SinglePassStereoRendering)
                    {
                        EditorPrefs.SetBool(ignore + singlePassStereoRendering, true);
                    }
#endif

                    Close();
                }
            }
        }
        else if (GUILayout.Button("Close"))
        {
            Close();
        }

        GUILayout.EndHorizontal();
    }