ReloadAllShaders() private method

private ReloadAllShaders ( ) : 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();
     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_MotionVectors.DoGUI();
     base.serializedObject.ApplyModifiedProperties();
 }
示例#3
0
            public override void OnInspectorGUI()
            {
                serializedObject.Update();

                m_Deferred.DoGUI();

                // deferred reflections being off affects forward vs deferred style probe rendering;
                // need to reload shaders for new platform macro to live update
                EditorGUI.BeginChangeCheck();
                m_DeferredReflections.DoGUI();
                if (EditorGUI.EndChangeCheck())
                {
                    ShaderUtil.ReloadAllShaders();
                }

                m_ScreenSpaceShadows.DoGUI();
                m_DepthNormals.DoGUI();
                m_MotionVectors.DoGUI();
                m_LightHalo.DoGUI();
                m_LensFlare.DoGUI();

                serializedObject.ApplyModifiedProperties();
            }
        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();
            }
        }