DrawLightmapResolutionField() 개인적인 정적인 메소드

private static DrawLightmapResolutionField ( SerializedProperty resolution, GUIContent label ) : void
resolution SerializedProperty
label GUIContent
리턴 void
예제 #1
0
        private void BakedGUI(SerializedObject so, SerializedProperty enableRealtimeGI, SerializedProperty enableBakedGI)
        {
            this.m_ShowBakeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowBakeSettings, LightingWindow.styles.BakedGILabel, enableBakedGI);
            if (!this.m_ShowBakeSettings)
            {
                return;
            }
            SerializedProperty property1 = so.FindProperty("m_LightmapEditorSettings.m_Resolution");
            SerializedProperty property2 = so.FindProperty("m_LightmapEditorSettings.m_BakeResolution");
            SerializedProperty property3 = so.FindProperty("m_LightmapEditorSettings.m_Padding");
            SerializedProperty property4 = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponent");
            SerializedProperty property5 = so.FindProperty("m_LightmapEditorSettings.m_AOMaxDistance");
            SerializedProperty property6 = so.FindProperty("m_LightmapEditorSettings.m_TextureCompression");
            SerializedProperty property7 = so.FindProperty("m_LightmapEditorSettings.m_FinalGather");
            SerializedProperty property8 = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherRayCount");
            SerializedProperty property9 = so.FindProperty("m_LightmapEditorSettings.m_TextureWidth");

            ++EditorGUI.indentLevel;
            EditorGUI.BeginDisabledGroup(!enableBakedGI.boolValue);
            LightingWindow.DrawLightmapResolutionField(property2, LightingWindow.styles.BakeResolution);
            GUILayout.BeginHorizontal();
            EditorGUILayout.PropertyField(property3, LightingWindow.styles.Padding, new GUILayoutOption[0]);
            GUILayout.Label(" texels", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
            GUILayout.EndHorizontal();
            EditorGUILayout.PropertyField(property6, LightingWindow.s_Styles.TextureCompression, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            this.m_ShowIndirectResolution.target = !enableRealtimeGI.boolValue;
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectResolution.faded))
            {
                LightingWindow.DrawLightmapResolutionField(property1, LightingWindow.styles.IndirectResolution);
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Slider(property4, 0.0f, 10f, LightingWindow.styles.AmbientOcclusion, new GUILayoutOption[0]);
            if ((double)property4.floatValue > 0.0)
            {
                ++EditorGUI.indentLevel;
                EditorGUILayout.PropertyField(property5, LightingWindow.styles.AOMaxDistance, new GUILayoutOption[0]);
                if ((double)property5.floatValue < 0.0)
                {
                    property5.floatValue = 0.0f;
                }
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.PropertyField(property7, LightingWindow.s_Styles.FinalGather, new GUILayoutOption[0]);
            if (property7.boolValue)
            {
                ++EditorGUI.indentLevel;
                EditorGUILayout.PropertyField(property8, LightingWindow.styles.FinalGatherRayCount, new GUILayoutOption[0]);
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.IntPopup(property9, this.kMaxAtlasSizeStrings, this.kMaxAtlasSizeValues, LightingWindow.styles.MaxAtlasSize, new GUILayoutOption[0]);
            EditorGUI.EndDisabledGroup();
            --EditorGUI.indentLevel;
        }
예제 #2
0
        private void BakedGUI(SerializedObject so, SerializedProperty enableRealtimeGI, SerializedProperty enableBakedGI)
        {
            this.m_ShowBakeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowBakeSettings, LightingWindow.styles.BakedGILabel, enableBakedGI);
            if (!this.m_ShowBakeSettings)
            {
                return;
            }
            SerializedProperty resolution          = so.FindProperty("m_LightmapEditorSettings.m_Resolution");
            SerializedProperty resolution2         = so.FindProperty("m_LightmapEditorSettings.m_BakeResolution");
            SerializedProperty property            = so.FindProperty("m_LightmapEditorSettings.m_Padding");
            SerializedProperty serializedProperty  = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponent");
            SerializedProperty serializedProperty2 = so.FindProperty("m_LightmapEditorSettings.m_AOMaxDistance");
            SerializedProperty property2           = so.FindProperty("m_LightmapEditorSettings.m_TextureCompression");
            SerializedProperty serializedProperty3 = so.FindProperty("m_LightmapEditorSettings.m_FinalGather");
            SerializedProperty property3           = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherRayCount");

            EditorGUI.indentLevel++;
            EditorGUI.BeginDisabledGroup(!enableBakedGI.boolValue);
            LightingWindow.DrawLightmapResolutionField(resolution2, LightingWindow.styles.BakeResolution);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(property, LightingWindow.styles.Padding, new GUILayoutOption[0]);
            GUILayout.Label(" texels", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
            GUILayout.EndHorizontal();
            EditorGUILayout.PropertyField(property2, LightingWindow.s_Styles.TextureCompression, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            this.m_ShowIndirectResolution.target = !enableRealtimeGI.boolValue;
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectResolution.faded))
            {
                LightingWindow.DrawLightmapResolutionField(resolution, LightingWindow.styles.IndirectResolution);
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Slider(serializedProperty, 0f, 1f, LightingWindow.styles.AmbientOcclusion, new GUILayoutOption[0]);
            if (serializedProperty.floatValue > 0f)
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(serializedProperty2, LightingWindow.styles.AOMaxDistance, new GUILayoutOption[0]);
                if (serializedProperty2.floatValue < 0f)
                {
                    serializedProperty2.floatValue = 0f;
                }
                EditorGUI.indentLevel--;
            }
            EditorGUILayout.PropertyField(serializedProperty3, LightingWindow.s_Styles.FinalGather, new GUILayoutOption[0]);
            if (serializedProperty3.boolValue)
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(property3, LightingWindow.styles.FinalGatherRayCount, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
            }
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
        }
예제 #3
0
 private void RealtimeGUI(SerializedObject so, SerializedProperty enableRealtimeGI)
 {
     this.m_ShowRealtimeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowRealtimeSettings, LightingWindow.styles.RealtimeGILabel, enableRealtimeGI);
     if (this.m_ShowRealtimeSettings)
     {
         SerializedProperty property   = so.FindProperty("m_RuntimeCPUUsage");
         SerializedProperty resolution = so.FindProperty("m_LightmapEditorSettings.m_Resolution");
         EditorGUI.indentLevel++;
         using (new EditorGUI.DisabledScope(!enableRealtimeGI.boolValue))
         {
             LightingWindow.DrawLightmapResolutionField(resolution, LightingWindow.styles.Resolution);
             EditorGUILayout.IntPopup(property, LightingWindow.styles.RuntimeCPUUsageStrings, LightingWindow.styles.RuntimeCPUUsageValues, LightingWindow.styles.RuntimeCPUUsage, new GUILayoutOption[0]);
         }
         EditorGUI.indentLevel--;
     }
 }
예제 #4
0
        private void RealtimeGUI(SerializedObject so, SerializedProperty enableRealtimeGI, SerializedProperty enableBakedGI)
        {
            this.m_ShowRealtimeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowRealtimeSettings, LightingWindow.styles.RealtimeGILabel, enableRealtimeGI);
            if (!this.m_ShowRealtimeSettings)
            {
                return;
            }
            SerializedProperty property1 = so.FindProperty("m_RuntimeCPUUsage");
            SerializedProperty property2 = so.FindProperty("m_LightmapEditorSettings.m_Resolution");

            ++EditorGUI.indentLevel;
            EditorGUI.BeginDisabledGroup(!enableRealtimeGI.boolValue);
            LightingWindow.DrawLightmapResolutionField(property2, LightingWindow.styles.Resolution);
            EditorGUILayout.IntPopup(property1, LightingWindow.styles.RuntimeCPUUsageStrings, LightingWindow.styles.RuntimeCPUUsageValues, LightingWindow.styles.RuntimeCPUUsage, new GUILayoutOption[0]);
            EditorGUI.EndDisabledGroup();
            --EditorGUI.indentLevel;
        }
예제 #5
0
 private void BakedGUI(SerializedObject so, bool enableRealtimeGI, SerializedProperty enableBakedGI)
 {
     this.m_ShowBakeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowBakeSettings, LightingWindow.styles.BakedGILabel, enableBakedGI);
     if (this.m_ShowBakeSettings)
     {
         SerializedProperty resolution          = so.FindProperty("m_LightmapEditorSettings.m_Resolution");
         SerializedProperty resolution2         = so.FindProperty("m_LightmapEditorSettings.m_BakeResolution");
         SerializedProperty property            = so.FindProperty("m_LightmapEditorSettings.m_Padding");
         SerializedProperty serializedProperty  = so.FindProperty("m_LightmapEditorSettings.m_AO");
         SerializedProperty serializedProperty2 = so.FindProperty("m_LightmapEditorSettings.m_AOMaxDistance");
         SerializedProperty property2           = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponent");
         SerializedProperty property3           = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponentDirect");
         SerializedProperty property4           = so.FindProperty("m_LightmapEditorSettings.m_TextureCompression");
         SerializedProperty property5           = so.FindProperty("m_LightmapEditorSettings.m_DirectLightInLightProbes");
         SerializedProperty serializedProperty3 = so.FindProperty("m_LightmapEditorSettings.m_FinalGather");
         SerializedProperty property6           = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherRayCount");
         SerializedProperty property7           = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherFiltering");
         SerializedProperty property8           = so.FindProperty("m_LightmapEditorSettings.m_TextureWidth");
         EditorGUI.indentLevel++;
         using (new EditorGUI.DisabledScope(!enableBakedGI.boolValue))
         {
             LightingWindow.DrawLightmapResolutionField(resolution2, LightingWindow.styles.BakeResolution);
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(property, LightingWindow.styles.Padding, new GUILayoutOption[0]);
             GUILayout.Label(" texels", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
             GUILayout.EndHorizontal();
             EditorGUILayout.PropertyField(property4, LightingWindow.s_Styles.TextureCompression, new GUILayoutOption[0]);
             this.m_ShowIndirectResolution.target = !enableRealtimeGI;
             if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectResolution.faded))
             {
                 EditorGUILayout.Space();
                 LightingWindow.DrawLightmapResolutionField(resolution, LightingWindow.styles.IndirectResolution);
                 EditorGUILayout.Space();
             }
             EditorGUILayout.EndFadeGroup();
             EditorGUILayout.PropertyField(serializedProperty, LightingWindow.s_Styles.AO, new GUILayoutOption[0]);
             if (serializedProperty.boolValue)
             {
                 EditorGUI.indentLevel++;
                 EditorGUILayout.PropertyField(serializedProperty2, LightingWindow.styles.AOMaxDistance, new GUILayoutOption[0]);
                 if (serializedProperty2.floatValue < 0f)
                 {
                     serializedProperty2.floatValue = 0f;
                 }
                 EditorGUILayout.Slider(property2, 0f, 10f, LightingWindow.styles.AmbientOcclusion, new GUILayoutOption[0]);
                 EditorGUILayout.Slider(property3, 0f, 10f, LightingWindow.styles.AmbientOcclusionDirect, new GUILayoutOption[0]);
                 EditorGUI.indentLevel--;
             }
             EditorGUILayout.PropertyField(serializedProperty3, LightingWindow.s_Styles.FinalGather, new GUILayoutOption[0]);
             if (serializedProperty3.boolValue)
             {
                 EditorGUI.indentLevel++;
                 EditorGUILayout.PropertyField(property6, LightingWindow.styles.FinalGatherRayCount, new GUILayoutOption[0]);
                 EditorGUILayout.PropertyField(property7, LightingWindow.styles.FinalGatherFiltering, new GUILayoutOption[0]);
                 EditorGUI.indentLevel--;
             }
             EditorGUILayout.IntPopup(property8, this.kMaxAtlasSizeStrings, this.kMaxAtlasSizeValues, LightingWindow.styles.MaxAtlasSize, new GUILayoutOption[0]);
             EditorGUILayout.Space();
             EditorGUILayout.LabelField(LightingWindow.styles.LightProbesTitle, new GUILayoutOption[0]);
             EditorGUI.indentLevel++;
             EditorGUILayout.PropertyField(property5, LightingWindow.s_Styles.DirectLightInLightProbes, new GUILayoutOption[0]);
             EditorGUI.indentLevel--;
             EditorGUILayout.Space();
         }
         EditorGUI.indentLevel--;
     }
 }