CalculateLightmapStrippingFromCurrentScene() private method

private CalculateLightmapStrippingFromCurrentScene ( ) : void
return void
コード例 #1
0
        public override void OnInspectorGUI()
        {
            this.serializedObject.Update();
            bool calcLightmapStripping = false;
            bool calcFogStripping      = false;

            GUILayout.Label(GraphicsSettingsInspector.Styles.builtinSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.m_Deferred.DoGUI();
            EditorGUI.BeginChangeCheck();
            this.m_DeferredReflections.DoGUI();
            if (EditorGUI.EndChangeCheck())
            {
                ShaderUtil.ReloadAllShaders();
            }
            this.m_LegacyDeferred.DoGUI();
            EditorGUILayout.PropertyField(this.m_AlwaysIncludedShaders, true, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            GUILayout.Label(GraphicsSettingsInspector.Styles.shaderStrippingSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.LightmapStrippingGUI(out calcLightmapStripping);
            this.FogStrippingGUI(out calcFogStripping);
            this.ShaderPreloadGUI();
            this.serializedObject.ApplyModifiedProperties();
            if (calcLightmapStripping)
            {
                ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
            }
            if (!calcFogStripping)
            {
                return;
            }
            ShaderUtil.CalculateFogStrippingFromCurrentScene();
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            bool flag  = false;
            bool flag2 = false;

            GUILayout.Label(GraphicsSettingsInspector.Styles.builtinSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.m_Deferred.DoGUI();
            this.m_LegacyDeferred.DoGUI();
            EditorGUILayout.PropertyField(this.m_AlwaysIncludedShaders, true, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            GUILayout.Label(GraphicsSettingsInspector.Styles.shaderStrippingSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.LightmapStrippingGUI(out flag);
            this.FogStrippingGUI(out flag2);
            this.ShaderPreloadGUI();
            base.serializedObject.ApplyModifiedProperties();
            if (flag)
            {
                ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
            }
            if (flag2)
            {
                ShaderUtil.CalculateFogStrippingFromCurrentScene();
            }
        }
コード例 #3
0
            public override void OnInspectorGUI()
            {
                base.serializedObject.Update();
                bool flag  = false;
                bool flag2 = false;

                EditorGUILayout.PropertyField(this.m_LightmapStripping, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapModes, new GUILayoutOption[0]);
                if (this.m_LightmapStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_LightmapKeepPlain, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapPlain, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDirCombined, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapDirCombined, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDynamicPlain, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapDynamicPlain, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDynamicDirCombined, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapDynamicDirCombined, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepShadowMask, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapKeepShadowMask, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepSubtractive, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapKeepSubtractive, new GUILayoutOption[0]);
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);
                    if (GUILayout.Button(GraphicsSettingsWindow.ShaderStrippingEditor.Styles.lightmapFromScene, EditorStyles.miniButton, new GUILayoutOption[]
                    {
                        GUILayout.ExpandWidth(false)
                    }))
                    {
                        flag = true;
                    }
                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.PropertyField(this.m_FogStripping, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.fogModes, new GUILayoutOption[0]);
                if (this.m_FogStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_FogKeepLinear, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.fogLinear, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_FogKeepExp, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.fogExp, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_FogKeepExp2, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.fogExp2, new GUILayoutOption[0]);
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);
                    if (GUILayout.Button(GraphicsSettingsWindow.ShaderStrippingEditor.Styles.fogFromScene, EditorStyles.miniButton, new GUILayoutOption[]
                    {
                        GUILayout.ExpandWidth(false)
                    }))
                    {
                        flag2 = true;
                    }
                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.PropertyField(this.m_InstancingStripping, GraphicsSettingsWindow.ShaderStrippingEditor.Styles.instancingVariants, new GUILayoutOption[0]);
                base.serializedObject.ApplyModifiedProperties();
                if (flag)
                {
                    ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
                }
                if (flag2)
                {
                    ShaderUtil.CalculateFogStrippingFromCurrentScene();
                }
            }
コード例 #4
0
            public override void OnInspectorGUI()
            {
                base.serializedObject.Update();
                bool flag  = false;
                bool flag2 = false;

                EditorGUILayout.PropertyField(this.m_LightmapStripping, Styles.lightmapModes, new GUILayoutOption[0]);
                if (this.m_LightmapStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_LightmapKeepPlain, Styles.lightmapPlain, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDirCombined, Styles.lightmapDirCombined, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDirSeparate, Styles.lightmapDirSeparate, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDynamicPlain, Styles.lightmapDynamicPlain, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDynamicDirCombined, Styles.lightmapDynamicDirCombined, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_LightmapKeepDynamicDirSeparate, Styles.lightmapDynamicDirSeparate, new GUILayoutOption[0]);
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);
                    GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
                    if (GUILayout.Button(Styles.lightmapFromScene, EditorStyles.miniButton, options))
                    {
                        flag = true;
                    }
                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.PropertyField(this.m_FogStripping, Styles.fogModes, new GUILayoutOption[0]);
                if (this.m_FogStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_FogKeepLinear, Styles.fogLinear, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_FogKeepExp, Styles.fogExp, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_FogKeepExp2, Styles.fogExp2, new GUILayoutOption[0]);
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);
                    GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
                    if (GUILayout.Button(Styles.fogFromScene, EditorStyles.miniButton, optionArray2))
                    {
                        flag2 = true;
                    }
                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                }
                base.serializedObject.ApplyModifiedProperties();
                if (flag)
                {
                    ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
                }
                if (flag2)
                {
                    ShaderUtil.CalculateFogStrippingFromCurrentScene();
                }
            }
コード例 #5
0
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            bool flag  = false;
            bool flag2 = false;

            GUILayout.Label(GraphicsSettingsInspector.Styles.builtinSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.m_Deferred.DoGUI();
            EditorGUI.BeginChangeCheck();
            this.m_DeferredReflections.DoGUI();
            if (EditorGUI.EndChangeCheck())
            {
                ShaderUtil.ReloadAllShaders();
            }
            this.m_ScreenSpaceShadows.DoGUI();
            this.m_LegacyDeferred.DoGUI();
            this.m_DepthNormals.DoGUI();
            this.m_MotionVectors.DoGUI();
            this.m_LightHalo.DoGUI();
            this.m_LensFlare.DoGUI();
            EditorGUILayout.PropertyField(this.m_AlwaysIncludedShaders, true, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            GUILayout.Label(GraphicsSettingsInspector.Styles.shaderStrippingSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
            this.LightmapStrippingGUI(out flag);
            this.FogStrippingGUI(out flag2);
            this.ShaderPreloadGUI();
            base.serializedObject.ApplyModifiedProperties();
            if (flag)
            {
                ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
            }
            if (flag2)
            {
                ShaderUtil.CalculateFogStrippingFromCurrentScene();
            }
        }
コード例 #6
0
            public override void OnInspectorGUI()
            {
                serializedObject.Update();

                bool calcLightmapStripping = false, calcFogStripping = false;

                EditorGUILayout.PropertyField(m_LightmapStripping, Styles.lightmapModes);

                if (m_LightmapStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(m_LightmapKeepPlain, Styles.lightmapPlain);
                    EditorGUILayout.PropertyField(m_LightmapKeepDirCombined, Styles.lightmapDirCombined);
                    EditorGUILayout.PropertyField(m_LightmapKeepDynamicPlain, Styles.lightmapDynamicPlain);
                    EditorGUILayout.PropertyField(m_LightmapKeepDynamicDirCombined, Styles.lightmapDynamicDirCombined);
                    EditorGUILayout.PropertyField(m_LightmapKeepShadowMask, Styles.lightmapKeepShadowMask);
                    EditorGUILayout.PropertyField(m_LightmapKeepSubtractive, Styles.lightmapKeepSubtractive);
                    EditorGUILayout.Space();

                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);

                    if (GUILayout.Button(Styles.lightmapFromScene, EditorStyles.miniButton, GUILayout.ExpandWidth(false)))
                    {
                        calcLightmapStripping = true;
                    }

                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                    EditorGUILayout.Space();
                }

                EditorGUILayout.PropertyField(m_FogStripping, Styles.fogModes);
                if (m_FogStripping.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(m_FogKeepLinear, Styles.fogLinear);
                    EditorGUILayout.PropertyField(m_FogKeepExp, Styles.fogExp);
                    EditorGUILayout.PropertyField(m_FogKeepExp2, Styles.fogExp2);
                    EditorGUILayout.Space();

                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.PrefixLabel(GUIContent.Temp(" "), EditorStyles.miniButton);

                    if (GUILayout.Button(Styles.fogFromScene, EditorStyles.miniButton, GUILayout.ExpandWidth(false)))
                    {
                        calcFogStripping = true;
                    }

                    EditorGUILayout.EndHorizontal();
                    EditorGUI.indentLevel--;
                    EditorGUILayout.Space();
                }

                EditorGUILayout.PropertyField(m_InstancingStripping, Styles.instancingVariants);

                serializedObject.ApplyModifiedProperties();

                // need to do these after ApplyModifiedProperties, since it changes their values from native code
                if (calcLightmapStripping)
                {
                    ShaderUtil.CalculateLightmapStrippingFromCurrentScene();
                }
                if (calcFogStripping)
                {
                    ShaderUtil.CalculateFogStrippingFromCurrentScene();
                }
            }