private void Repaint()
 {
     InspectorWindow.RepaintAllInspectors();
 }
示例#2
0
 public void Repaint()
 {
     InspectorWindow.RepaintAllInspectors();
 }
 static public void RepaintAudioMixerAndInspectors()
 {
     InspectorWindow.RepaintAllInspectors();
     AudioMixerWindow.RepaintAudioMixerWindow();
 }
示例#4
0
 internal static void RepaintAllToolViews()
 {
     Toolbar.RepaintToolbar();
     SceneView.RepaintAll();
     InspectorWindow.RepaintAllInspectors();
 }
示例#5
0
 private void PresetsWasReordered()
 {
     InspectorWindow.RepaintAllInspectors();
 }
示例#6
0
 private void GeneralLightmapSettingsGUI()
 {
     this.m_ShowGeneralLightmapSettings = EditorGUILayout.FoldoutTitlebar(this.m_ShowGeneralLightmapSettings, LightingWindowBakeSettings.Styles.GeneralLightmapLabel, true);
     if (this.m_ShowGeneralLightmapSettings)
     {
         EditorGUI.indentLevel++;
         using (new EditorGUI.DisabledScope(!LightModeUtil.Get().IsAnyGIEnabled()))
         {
             using (new EditorGUI.DisabledScope(!LightModeUtil.Get().AreBakedLightmapsEnabled()))
             {
                 EditorGUI.BeginChangeCheck();
                 EditorGUILayout.PropertyField(this.m_BakeBackend, LightingWindowBakeSettings.Styles.BakeBackend, new GUILayoutOption[0]);
                 if (EditorGUI.EndChangeCheck())
                 {
                     InspectorWindow.RepaintAllInspectors();
                 }
                 if (LightmapEditorSettings.giBakeBackend == LightmapEditorSettings.GIBakeBackend.PathTracer)
                 {
                     EditorGUI.indentLevel++;
                     EditorGUILayout.PropertyField(this.m_PVRCulling, LightingWindowBakeSettings.Styles.PVRCulling, new GUILayoutOption[0]);
                     if (LightmapEditorSettings.giPathTracerSampling != LightmapEditorSettings.PathTracerSampling.Auto)
                     {
                         EditorGUILayout.PropertyField(this.m_PVRDirectSampleCount, LightingWindowBakeSettings.Styles.PVRDirectSampleCount, new GUILayoutOption[0]);
                         EditorGUILayout.PropertyField(this.m_PVRSampleCount, LightingWindowBakeSettings.Styles.PVRIndirectSampleCount, new GUILayoutOption[0]);
                         if (this.m_PVRSampleCount.intValue < 10 || this.m_PVRSampleCount.intValue > 100000)
                         {
                             this.m_PVRSampleCount.intValue = Math.Max(Math.Min(this.m_PVRSampleCount.intValue, 100000), 10);
                         }
                     }
                     EditorGUILayout.IntPopup(this.m_PVRBounces, LightingWindowBakeSettings.Styles.BouncesStrings, LightingWindowBakeSettings.Styles.BouncesValues, LightingWindowBakeSettings.Styles.PVRBounces, new GUILayoutOption[0]);
                     EditorGUILayout.PropertyField(this.m_PVRFilteringMode, LightingWindowBakeSettings.Styles.PVRFilteringMode, new GUILayoutOption[0]);
                     if (this.m_PVRFilteringMode.enumValueIndex == 2)
                     {
                         EditorGUI.indentLevel++;
                         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                         EditorGUILayout.IntSlider(this.m_PVRFilteringGaussRadiusDirect, 0, 5, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusDirect, new GUILayoutOption[0]);
                         GUILayout.Label(" texels", LightingWindowBakeSettings.Styles.LabelStyle, new GUILayoutOption[0]);
                         GUILayout.EndHorizontal();
                         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                         EditorGUILayout.IntSlider(this.m_PVRFilteringGaussRadiusIndirect, 0, 5, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusIndirect, new GUILayoutOption[0]);
                         GUILayout.Label(" texels", LightingWindowBakeSettings.Styles.LabelStyle, new GUILayoutOption[0]);
                         GUILayout.EndHorizontal();
                         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                         EditorGUILayout.IntSlider(this.m_PVRFilteringGaussRadiusAO, 0, 5, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusAO, new GUILayoutOption[0]);
                         GUILayout.Label(" texels", LightingWindowBakeSettings.Styles.LabelStyle, new GUILayoutOption[0]);
                         GUILayout.EndHorizontal();
                         EditorGUI.indentLevel--;
                     }
                     EditorGUI.indentLevel--;
                     EditorGUILayout.Space();
                 }
             }
             using (new EditorGUI.DisabledScope(LightmapEditorSettings.giBakeBackend == LightmapEditorSettings.GIBakeBackend.PathTracer && !LightModeUtil.Get().IsRealtimeGIEnabled()))
             {
                 LightingWindowBakeSettings.DrawResolutionField(this.m_Resolution, LightingWindowBakeSettings.Styles.IndirectResolution);
             }
             using (new EditorGUI.DisabledScope(!LightModeUtil.Get().AreBakedLightmapsEnabled()))
             {
                 LightingWindowBakeSettings.DrawResolutionField(this.m_BakeResolution, LightingWindowBakeSettings.Styles.LightmapResolution);
                 GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                 EditorGUILayout.PropertyField(this.m_Padding, LightingWindowBakeSettings.Styles.Padding, new GUILayoutOption[0]);
                 GUILayout.Label(" texels", LightingWindowBakeSettings.Styles.LabelStyle, new GUILayoutOption[0]);
                 GUILayout.EndHorizontal();
                 EditorGUILayout.IntPopup(this.m_LightmapSize, LightingWindowBakeSettings.Styles.LightmapSizeStrings, LightingWindowBakeSettings.Styles.LightmapSizeValues, LightingWindowBakeSettings.Styles.LightmapSize, new GUILayoutOption[0]);
                 EditorGUILayout.PropertyField(this.m_TextureCompression, LightingWindowBakeSettings.Styles.TextureCompression, new GUILayoutOption[0]);
                 EditorGUILayout.PropertyField(this.m_AmbientOcclusion, LightingWindowBakeSettings.Styles.AmbientOcclusion, new GUILayoutOption[0]);
                 if (this.m_AmbientOcclusion.boolValue)
                 {
                     EditorGUI.indentLevel++;
                     EditorGUILayout.PropertyField(this.m_AOMaxDistance, LightingWindowBakeSettings.Styles.AOMaxDistance, new GUILayoutOption[0]);
                     if (this.m_AOMaxDistance.floatValue < 0f)
                     {
                         this.m_AOMaxDistance.floatValue = 0f;
                     }
                     EditorGUILayout.Slider(this.m_CompAOExponent, 0f, 10f, LightingWindowBakeSettings.Styles.AmbientOcclusionContribution, new GUILayoutOption[0]);
                     EditorGUILayout.Slider(this.m_CompAOExponentDirect, 0f, 10f, LightingWindowBakeSettings.Styles.AmbientOcclusionContributionDirect, new GUILayoutOption[0]);
                     EditorGUI.indentLevel--;
                 }
                 if (LightmapEditorSettings.giBakeBackend == LightmapEditorSettings.GIBakeBackend.Radiosity)
                 {
                     EditorGUILayout.PropertyField(this.m_FinalGather, LightingWindowBakeSettings.Styles.FinalGather, new GUILayoutOption[0]);
                     if (this.m_FinalGather.boolValue)
                     {
                         EditorGUI.indentLevel++;
                         EditorGUILayout.PropertyField(this.m_FinalGatherRayCount, LightingWindowBakeSettings.Styles.FinalGatherRayCount, new GUILayoutOption[0]);
                         EditorGUILayout.PropertyField(this.m_FinalGatherFiltering, LightingWindowBakeSettings.Styles.FinalGatherFiltering, new GUILayoutOption[0]);
                         EditorGUI.indentLevel--;
                     }
                 }
             }
             EditorGUILayout.IntPopup(this.m_LightmapDirectionalMode, LightingWindowBakeSettings.Styles.LightmapDirectionalModeStrings, LightingWindowBakeSettings.Styles.LightmapDirectionalModeValues, LightingWindowBakeSettings.Styles.LightmapDirectionalMode, new GUILayoutOption[0]);
             if (this.m_LightmapDirectionalMode.intValue == 1)
             {
                 EditorGUILayout.HelpBox(LightingWindowBakeSettings.Styles.NoDirectionalInSM2AndGLES2.text, MessageType.Warning);
             }
             EditorGUILayout.Slider(this.m_IndirectOutputScale, 0f, 5f, LightingWindowBakeSettings.Styles.IndirectOutputScale, new GUILayoutOption[0]);
             EditorGUILayout.Slider(this.m_AlbedoBoost, 1f, 10f, LightingWindowBakeSettings.Styles.AlbedoBoost, new GUILayoutOption[0]);
             if (LightingWindowBakeSettings.LightmapParametersGUI(this.m_LightmapParameters, LightingWindowBakeSettings.Styles.DefaultLightmapParameters))
             {
                 EditorWindow.FocusWindowIfItsOpen <InspectorWindow>();
             }
             EditorGUI.indentLevel--;
             EditorGUILayout.Space();
         }
     }
 }
示例#7
0
        void GeneralLightmapSettingsGUI()
        {
            bool bakedGISupported = SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Baked);

            if (!bakedGISupported && !SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Realtime))
            {
                return;
            }

            m_ShowGeneralLightmapSettings = EditorGUILayout.FoldoutTitlebar(m_ShowGeneralLightmapSettings, Styles.GeneralLightmapLabel, true);
            if (m_ShowGeneralLightmapSettings)
            {
                EditorGUI.indentLevel++;
                using (new EditorGUI.DisabledScope(!m_EnabledBakedGI.boolValue && !m_EnableRealtimeGI.boolValue))
                {
                    if (bakedGISupported)
                    {
                        using (new EditorGUI.DisabledScope(!m_EnabledBakedGI.boolValue))
                        {
                            EditorGUI.BeginChangeCheck();
                            EditorGUILayout.PropertyField(m_BakeBackend, Styles.BakeBackend);
                            if (EditorGUI.EndChangeCheck())
                            {
                                InspectorWindow.RepaintAllInspectors(); // We need to repaint other inspectors that might need to update based on the selected backend.
                            }
                            if (LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.ProgressiveCPU)
                            {
                                EditorGUI.indentLevel++;

                                EditorGUILayout.PropertyField(m_PVRCulling, Styles.PVRCulling);

                                // Sampling type
                                //EditorGUILayout.PropertyField(m_PvrSampling, Styles.m_PVRSampling); // TODO(PVR): make non-fixed sampling modes work.

                                if (LightmapEditorSettings.sampling != LightmapEditorSettings.Sampling.Auto)
                                {
                                    // Update those constants also in LightmapBake.cpp UpdateSamples().
                                    const int kMinSamples = 10;
                                    const int kMaxSamples = 100000;

                                    // Sample count
                                    // TODO(PVR): make non-fixed sampling modes work.
                                    //EditorGUI.indentLevel++;
                                    //if (LightmapEditorSettings.giPathTracerSampling == LightmapEditorSettings.PathTracerSampling.PathTracerSamplingAdaptive)
                                    //  EditorGUILayout.PropertyField(m_PVRSampleCount, Styles.PVRSampleCountAdaptive);
                                    //else

                                    EditorGUILayout.PropertyField(m_PVRDirectSampleCount, Styles.PVRDirectSampleCount);
                                    EditorGUILayout.PropertyField(m_PVRSampleCount, Styles.PVRIndirectSampleCount);

                                    if (m_PVRSampleCount.intValue < kMinSamples ||
                                        m_PVRSampleCount.intValue > kMaxSamples)
                                    {
                                        m_PVRSampleCount.intValue = Math.Max(Math.Min(m_PVRSampleCount.intValue, kMaxSamples), kMinSamples);
                                    }

                                    // TODO(PVR): make non-fixed sampling modes work.
                                    //EditorGUI.indentLevel--;
                                }

                                EditorGUILayout.IntPopup(m_PVRBounces, Styles.BouncesStrings, Styles.BouncesValues, Styles.PVRBounces);

                                // Filtering
                                EditorGUILayout.PropertyField(m_PVRFilteringMode, Styles.PVRFilteringMode);

                                if (m_PVRFilteringMode.enumValueIndex == (int)LightmapEditorSettings.FilterMode.Advanced)
                                {
                                    EditorGUI.indentLevel++;

                                    EditorGUILayout.PropertyField(m_PVRFilterTypeDirect, Styles.PVRFilterTypeDirect);
                                    DrawFilterSettingField(m_PVRFilteringGaussRadiusDirect,
                                                           m_PVRFilteringAtrousPositionSigmaDirect,
                                                           Styles.PVRFilteringGaussRadiusDirect,
                                                           Styles.PVRFilteringAtrousPositionSigmaDirect,
                                                           LightmapEditorSettings.filterTypeDirect);

                                    EditorGUILayout.Space();

                                    EditorGUILayout.PropertyField(m_PVRFilterTypeIndirect, Styles.PVRFilterTypeIndirect);
                                    DrawFilterSettingField(m_PVRFilteringGaussRadiusIndirect,
                                                           m_PVRFilteringAtrousPositionSigmaIndirect,
                                                           Styles.PVRFilteringGaussRadiusIndirect,
                                                           Styles.PVRFilteringAtrousPositionSigmaIndirect,
                                                           LightmapEditorSettings.filterTypeIndirect);

                                    using (new EditorGUI.DisabledScope(!m_AmbientOcclusion.boolValue))
                                    {
                                        EditorGUILayout.Space();

                                        EditorGUILayout.PropertyField(m_PVRFilterTypeAO, Styles.PVRFilterTypeAO);
                                        DrawFilterSettingField(m_PVRFilteringGaussRadiusAO,
                                                               m_PVRFilteringAtrousPositionSigmaAO,
                                                               Styles.PVRFilteringGaussRadiusAO, Styles.PVRFilteringAtrousPositionSigmaAO,
                                                               LightmapEditorSettings.filterTypeAO);
                                    }

                                    EditorGUI.indentLevel--;
                                }

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

                    using (new EditorGUI.DisabledScope((LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.ProgressiveCPU) && !m_EnableRealtimeGI.boolValue))
                    {
                        DrawResolutionField(m_Resolution, Styles.IndirectResolution);
                    }

                    if (bakedGISupported)
                    {
                        using (new EditorGUI.DisabledScope(!m_EnabledBakedGI.boolValue))
                        {
                            DrawResolutionField(m_BakeResolution, Styles.LightmapResolution);

                            GUILayout.BeginHorizontal();
                            EditorGUILayout.PropertyField(m_Padding, Styles.Padding);
                            GUILayout.Label(" texels", Styles.LabelStyle);
                            GUILayout.EndHorizontal();

                            EditorGUILayout.IntPopup(m_LightmapSize, Styles.LightmapSizeStrings, Styles.LightmapSizeValues, Styles.LightmapSize);

                            EditorGUILayout.PropertyField(m_TextureCompression, Styles.TextureCompression);

                            EditorGUILayout.PropertyField(m_AmbientOcclusion, Styles.AmbientOcclusion);
                            if (m_AmbientOcclusion.boolValue)
                            {
                                EditorGUI.indentLevel++;
                                EditorGUILayout.PropertyField(m_AOMaxDistance, Styles.AOMaxDistance);
                                if (m_AOMaxDistance.floatValue < 0.0f)
                                {
                                    m_AOMaxDistance.floatValue = 0.0f;
                                }
                                EditorGUILayout.Slider(m_CompAOExponent, 0.0f, 10.0f, Styles.AmbientOcclusionContribution);
                                EditorGUILayout.Slider(m_CompAOExponentDirect, 0.0f, 10.0f, Styles.AmbientOcclusionContributionDirect);
                                EditorGUI.indentLevel--;
                            }

                            if (LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.Enlighten)
                            {
                                EditorGUILayout.PropertyField(m_FinalGather, Styles.FinalGather);
                                if (m_FinalGather.boolValue)
                                {
                                    EditorGUI.indentLevel++;
                                    EditorGUILayout.PropertyField(m_FinalGatherRayCount, Styles.FinalGatherRayCount);
                                    EditorGUILayout.PropertyField(m_FinalGatherFiltering, Styles.FinalGatherFiltering);
                                    EditorGUI.indentLevel--;
                                }
                            }
                        }
                    }

                    bool directionalSupported = SupportedRenderingFeatures.IsLightmapsModeSupported(LightmapsMode.CombinedDirectional);

                    if (directionalSupported || (m_LightmapDirectionalMode.intValue == (int)LightmapsMode.CombinedDirectional))
                    {
                        EditorGUILayout.IntPopup(m_LightmapDirectionalMode, Styles.LightmapDirectionalModeStrings, Styles.LightmapDirectionalModeValues, Styles.LightmapDirectionalMode);

                        if (!directionalSupported)
                        {
                            EditorGUILayout.HelpBox("Directional Mode is not supported. Fallback will be Non-Directional.", MessageType.Warning);
                        }
                    }
                    else
                    {
                        using (new EditorGUI.DisabledScope(true))
                        {
                            EditorGUILayout.IntPopup(Styles.LightmapDirectionalMode, 0, Styles.LightmapDirectionalModeStrings, Styles.LightmapDirectionalModeValues);
                        }
                    }

                    EditorGUILayout.Slider(m_IndirectOutputScale, 0.0f, 5.0f, Styles.IndirectOutputScale);

                    // albedo boost, push the albedo value towards one in order to get more bounce
                    EditorGUILayout.Slider(m_AlbedoBoost, 1.0f, 10.0f, Styles.AlbedoBoost);

                    if (LightmapParametersGUI(m_LightmapParameters, Styles.DefaultLightmapParameters))
                    {
                        EditorWindow.FocusWindowIfItsOpen <InspectorWindow>();
                    }

                    EditorGUI.indentLevel--;
                    EditorGUILayout.Space();
                }
            }
        }
        public override void OnPreviewSettings()
        {
            if (s_DefaultIcon == null)
            {
                Init();
            }

            AudioClip clip = target as AudioClip;

            bool isEditingMultipleObjects = targets.Length > 1;

            using (new EditorGUI.DisabledScope(AudioUtil.IsMovieAudio(clip)))
            {
                bool oldAutoPlay = m_bAutoPlay;
                bool newAutoPlay = PreviewGUI.CycleButton(oldAutoPlay ? 1 : 0, s_AutoPlayIcons) != 0;
                if (oldAutoPlay != newAutoPlay)
                {
                    m_bAutoPlay = newAutoPlay;
                    InspectorWindow.RepaintAllInspectors();
                }

                bool oldLoop = m_bLoop;
                bool newLoop = PreviewGUI.CycleButton(oldLoop ? 1 : 0, s_LoopIcons) != 0;
                if (oldLoop != newLoop)
                {
                    m_bLoop = newLoop;
                    if (playing)
                    {
                        AudioUtil.LoopClip(clip, newLoop);
                    }
                    InspectorWindow.RepaintAllInspectors();
                }

                using (new EditorGUI.DisabledScope(isEditingMultipleObjects && !playing && m_PlayingInspector != this))
                {
                    bool curPlaying = m_PlayingInspector == this && playing;
                    bool newPlaying = PreviewGUI.CycleButton(curPlaying ? 1 : 0, s_PlayIcons) != 0;

                    if (newPlaying != curPlaying)
                    {
                        AudioUtil.StopAllClips();
                        m_PlayingClip      = null;
                        m_PlayingInspector = null;

                        if (newPlaying && !isEditingMultipleObjects)
                        {
                            AudioUtil.PlayClip(clip, 0, m_bLoop);
                            m_PlayingClip      = clip;
                            m_PlayingInspector = this;
                        }
                    }
                }
            }

            // autoplay start?
            if (m_bAutoPlay && m_PlayingClip != clip && m_PlayingInspector == this && !isEditingMultipleObjects)
            {
                AudioUtil.StopAllClips();
                m_PlayingClip      = null;
                m_PlayingInspector = null;

                if (!isEditingMultipleObjects)
                {
                    AudioUtil.PlayClip(clip, 0, m_bLoop);
                    m_PlayingClip      = clip;
                    m_PlayingInspector = this;
                }
            }
        }
示例#9
0
        private void GeneralLightmapSettingsGUI()
        {
            bool flag = SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Baked);

            if (flag || SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Realtime))
            {
                this.m_ShowGeneralLightmapSettings = EditorGUILayout.FoldoutTitlebar(this.m_ShowGeneralLightmapSettings, LightingWindowBakeSettings.Styles.GeneralLightmapLabel, true);
                if (this.m_ShowGeneralLightmapSettings)
                {
                    EditorGUI.indentLevel++;
                    using (new EditorGUI.DisabledScope(!this.m_EnabledBakedGI.boolValue && !this.m_EnableRealtimeGI.boolValue))
                    {
                        if (flag)
                        {
                            using (new EditorGUI.DisabledScope(!this.m_EnabledBakedGI.boolValue))
                            {
                                EditorGUI.BeginChangeCheck();
                                EditorGUILayout.PropertyField(this.m_BakeBackend, LightingWindowBakeSettings.Styles.BakeBackend, new GUILayoutOption[0]);
                                if (EditorGUI.EndChangeCheck())
                                {
                                    InspectorWindow.RepaintAllInspectors();
                                }
                                if (LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.PathTracer)
                                {
                                    EditorGUI.indentLevel++;
                                    EditorGUILayout.PropertyField(this.m_PVRCulling, LightingWindowBakeSettings.Styles.PVRCulling, new GUILayoutOption[0]);
                                    if (LightmapEditorSettings.sampling != LightmapEditorSettings.Sampling.Auto)
                                    {
                                        EditorGUILayout.PropertyField(this.m_PVRDirectSampleCount, LightingWindowBakeSettings.Styles.PVRDirectSampleCount, new GUILayoutOption[0]);
                                        EditorGUILayout.PropertyField(this.m_PVRSampleCount, LightingWindowBakeSettings.Styles.PVRIndirectSampleCount, new GUILayoutOption[0]);
                                        if (this.m_PVRSampleCount.intValue < 10 || this.m_PVRSampleCount.intValue > 100000)
                                        {
                                            this.m_PVRSampleCount.intValue = Math.Max(Math.Min(this.m_PVRSampleCount.intValue, 100000), 10);
                                        }
                                    }
                                    EditorGUILayout.IntPopup(this.m_PVRBounces, LightingWindowBakeSettings.Styles.BouncesStrings, LightingWindowBakeSettings.Styles.BouncesValues, LightingWindowBakeSettings.Styles.PVRBounces, new GUILayoutOption[0]);
                                    EditorGUILayout.PropertyField(this.m_PVRFilteringMode, LightingWindowBakeSettings.Styles.PVRFilteringMode, new GUILayoutOption[0]);
                                    if (this.m_PVRFilteringMode.enumValueIndex == 2)
                                    {
                                        EditorGUI.indentLevel++;
                                        EditorGUILayout.PropertyField(this.m_PVRFilterTypeDirect, LightingWindowBakeSettings.Styles.PVRFilterTypeDirect, new GUILayoutOption[0]);
                                        LightingWindowBakeSettings.DrawFilterSettingField(this.m_PVRFilteringGaussRadiusDirect, this.m_PVRFilteringAtrousPositionSigmaDirect, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusDirect, LightingWindowBakeSettings.Styles.PVRFilteringAtrousPositionSigmaDirect, LightmapEditorSettings.filterTypeDirect);
                                        EditorGUILayout.Space();
                                        EditorGUILayout.PropertyField(this.m_PVRFilterTypeIndirect, LightingWindowBakeSettings.Styles.PVRFilterTypeIndirect, new GUILayoutOption[0]);
                                        LightingWindowBakeSettings.DrawFilterSettingField(this.m_PVRFilteringGaussRadiusIndirect, this.m_PVRFilteringAtrousPositionSigmaIndirect, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusIndirect, LightingWindowBakeSettings.Styles.PVRFilteringAtrousPositionSigmaIndirect, LightmapEditorSettings.filterTypeIndirect);
                                        using (new EditorGUI.DisabledScope(!this.m_AmbientOcclusion.boolValue))
                                        {
                                            EditorGUILayout.Space();
                                            EditorGUILayout.PropertyField(this.m_PVRFilterTypeAO, LightingWindowBakeSettings.Styles.PVRFilterTypeAO, new GUILayoutOption[0]);
                                            LightingWindowBakeSettings.DrawFilterSettingField(this.m_PVRFilteringGaussRadiusAO, this.m_PVRFilteringAtrousPositionSigmaAO, LightingWindowBakeSettings.Styles.PVRFilteringGaussRadiusAO, LightingWindowBakeSettings.Styles.PVRFilteringAtrousPositionSigmaAO, LightmapEditorSettings.filterTypeAO);
                                        }
                                        EditorGUI.indentLevel--;
                                    }
                                    EditorGUI.indentLevel--;
                                    EditorGUILayout.Space();
                                }
                            }
                        }
                        using (new EditorGUI.DisabledScope(LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.PathTracer && !this.m_EnableRealtimeGI.boolValue))
                        {
                            LightingWindowBakeSettings.DrawResolutionField(this.m_Resolution, LightingWindowBakeSettings.Styles.IndirectResolution);
                        }
                        if (flag)
                        {
                            using (new EditorGUI.DisabledScope(!this.m_EnabledBakedGI.boolValue))
                            {
                                LightingWindowBakeSettings.DrawResolutionField(this.m_BakeResolution, LightingWindowBakeSettings.Styles.LightmapResolution);
                                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                                EditorGUILayout.PropertyField(this.m_Padding, LightingWindowBakeSettings.Styles.Padding, new GUILayoutOption[0]);
                                GUILayout.Label(" texels", LightingWindowBakeSettings.Styles.LabelStyle, new GUILayoutOption[0]);
                                GUILayout.EndHorizontal();
                                EditorGUILayout.IntPopup(this.m_LightmapSize, LightingWindowBakeSettings.Styles.LightmapSizeStrings, LightingWindowBakeSettings.Styles.LightmapSizeValues, LightingWindowBakeSettings.Styles.LightmapSize, new GUILayoutOption[0]);
                                EditorGUILayout.PropertyField(this.m_TextureCompression, LightingWindowBakeSettings.Styles.TextureCompression, new GUILayoutOption[0]);
                                EditorGUILayout.PropertyField(this.m_AmbientOcclusion, LightingWindowBakeSettings.Styles.AmbientOcclusion, new GUILayoutOption[0]);
                                if (this.m_AmbientOcclusion.boolValue)
                                {
                                    EditorGUI.indentLevel++;
                                    EditorGUILayout.PropertyField(this.m_AOMaxDistance, LightingWindowBakeSettings.Styles.AOMaxDistance, new GUILayoutOption[0]);
                                    if (this.m_AOMaxDistance.floatValue < 0f)
                                    {
                                        this.m_AOMaxDistance.floatValue = 0f;
                                    }
                                    EditorGUILayout.Slider(this.m_CompAOExponent, 0f, 10f, LightingWindowBakeSettings.Styles.AmbientOcclusionContribution, new GUILayoutOption[0]);
                                    EditorGUILayout.Slider(this.m_CompAOExponentDirect, 0f, 10f, LightingWindowBakeSettings.Styles.AmbientOcclusionContributionDirect, new GUILayoutOption[0]);
                                    EditorGUI.indentLevel--;
                                }
                                if (LightmapEditorSettings.lightmapper == LightmapEditorSettings.Lightmapper.Radiosity)
                                {
                                    EditorGUILayout.PropertyField(this.m_FinalGather, LightingWindowBakeSettings.Styles.FinalGather, new GUILayoutOption[0]);
                                    if (this.m_FinalGather.boolValue)
                                    {
                                        EditorGUI.indentLevel++;
                                        EditorGUILayout.PropertyField(this.m_FinalGatherRayCount, LightingWindowBakeSettings.Styles.FinalGatherRayCount, new GUILayoutOption[0]);
                                        EditorGUILayout.PropertyField(this.m_FinalGatherFiltering, LightingWindowBakeSettings.Styles.FinalGatherFiltering, new GUILayoutOption[0]);
                                        EditorGUI.indentLevel--;
                                    }
                                }
                            }
                        }
                        bool flag2 = SupportedRenderingFeatures.IsLightmapsModeSupported(LightmapsMode.CombinedDirectional);
                        if (flag2 || this.m_LightmapDirectionalMode.intValue == 1)
                        {
                            EditorGUILayout.IntPopup(this.m_LightmapDirectionalMode, LightingWindowBakeSettings.Styles.LightmapDirectionalModeStrings, LightingWindowBakeSettings.Styles.LightmapDirectionalModeValues, LightingWindowBakeSettings.Styles.LightmapDirectionalMode, new GUILayoutOption[0]);
                            if (!flag2)
                            {
                                EditorGUILayout.HelpBox("Directional Mode is not supported. Fallback will be Non-Directional.", MessageType.Warning);
                            }
                        }
                        else
                        {
                            using (new EditorGUI.DisabledScope(true))
                            {
                                EditorGUILayout.IntPopup(LightingWindowBakeSettings.Styles.LightmapDirectionalMode, 0, LightingWindowBakeSettings.Styles.LightmapDirectionalModeStrings, LightingWindowBakeSettings.Styles.LightmapDirectionalModeValues, new GUILayoutOption[0]);
                            }
                        }
                        EditorGUILayout.Slider(this.m_IndirectOutputScale, 0f, 5f, LightingWindowBakeSettings.Styles.IndirectOutputScale, new GUILayoutOption[0]);
                        EditorGUILayout.Slider(this.m_AlbedoBoost, 1f, 10f, LightingWindowBakeSettings.Styles.AlbedoBoost, new GUILayoutOption[0]);
                        if (LightingWindowBakeSettings.LightmapParametersGUI(this.m_LightmapParameters, LightingWindowBakeSettings.Styles.DefaultLightmapParameters))
                        {
                            EditorWindow.FocusWindowIfItsOpen <InspectorWindow>();
                        }
                        EditorGUI.indentLevel--;
                        EditorGUILayout.Space();
                    }
                }
            }
        }