Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            if (LightEditor.s_Styles == null)
            {
                LightEditor.s_Styles = new LightEditor.Styles();
            }
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            EditorGUILayout.PropertyField(this.m_Type, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.IntPopup(this.m_Lightmapping, LightEditor.s_Styles.LightmappingModes, LightEditor.s_Styles.LightmappingModeValues, LightEditor.s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
                {
                    GUIContent gUIContent = EditorGUIUtility.TextContent("LightEditor.GIBakingDisabledWarning");
                    EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, false);
                }
                EditorGUILayout.EndFadeGroup();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Space();
            bool  flag  = this.m_ShowDirOptions.isAnimating && this.m_ShowAreaOptions.isAnimating && (this.m_ShowDirOptions.target || this.m_ShowAreaOptions.target);
            float value = (!flag) ? (1f - Mathf.Max(this.m_ShowDirOptions.faded, this.m_ShowAreaOptions.faded)) : 0f;

            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaWarning.faded))
            {
                GUIContent gUIContent2 = EditorGUIUtility.TextContent("LightEditor.AreaLightsProOnly");
                EditorGUILayout.HelpBox(gUIContent2.text, MessageType.Warning, false);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(value))
            {
                EditorGUILayout.PropertyField(this.m_Range, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
            {
                EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_AreaSizeX, new GUIContent("Width"), new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_AreaSizeY, new GUIContent("Height"), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Color, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_Intensity, 0f, 8f, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_BounceIntensity, 0f, 8f, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
            {
                GUIContent gUIContent3 = EditorGUIUtility.TextContent("LightEditor.NoIndirectShadowsWarnings");
                EditorGUILayout.HelpBox(gUIContent3.text, MessageType.Warning, false);
            }
            EditorGUILayout.EndFadeGroup();
            this.ShadowsGUI();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_Cookie, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_CookieSize, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Halo, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Flare, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            if (SceneView.currentDrawingSceneView != null && !SceneView.currentDrawingSceneView.m_SceneLighting)
            {
                GUIContent gUIContent4 = EditorGUIUtility.TextContent("LightEditor.LightingDisabledInSceneViewWarning");
                EditorGUILayout.HelpBox(gUIContent4.text, MessageType.Warning, false);
            }
            base.serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            if (LightEditor.s_Styles == null)
            {
                LightEditor.s_Styles = new LightEditor.Styles();
            }
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            EditorGUILayout.PropertyField(this.m_Type, LightEditor.s_Styles.Type, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            float value = 1f - this.m_AnimShowDirOptions.faded;

            if (EditorGUILayout.BeginFadeGroup(value))
            {
                if (this.m_AnimShowAreaOptions.target)
                {
                    GUI.enabled = false;
                    string     tooltip = "For area lights " + this.m_Range.displayName + " is computed from Width, Height and Intensity";
                    GUIContent label   = new GUIContent(this.m_Range.displayName, tooltip);
                    EditorGUILayout.FloatField(label, this.light.range, new GUILayoutOption[0]);
                    GUI.enabled = true;
                }
                else
                {
                    EditorGUILayout.PropertyField(this.m_Range, LightEditor.s_Styles.Range, new GUILayoutOption[0]);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_AnimShowSpotOptions.faded))
            {
                EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, LightEditor.s_Styles.SpotAngle, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_AnimShowAreaOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_AreaSizeX, LightEditor.s_Styles.AreaWidth, new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_AreaSizeY, LightEditor.s_Styles.AreaHeight, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (GraphicsSettings.lightsUseLinearIntensity && GraphicsSettings.lightsUseColorTemperature)
            {
                EditorGUILayout.PropertyField(this.m_UseColorTemperature, LightEditor.s_Styles.UseColorTemperature, new GUILayoutOption[0]);
                if (this.m_UseColorTemperature.boolValue)
                {
                    EditorGUILayout.LabelField(LightEditor.s_Styles.Color, new GUILayoutOption[0]);
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_Color, LightEditor.s_Styles.ColorFilter, new GUILayoutOption[0]);
                    EditorGUILayout.SliderWithTexture(LightEditor.s_Styles.ColorTemperature, this.m_ColorTemperature, 1000f, 20000f, 2f, LightEditor.Styles.sliderBox, LightEditor.Styles.sliderThumb, this.m_KelvinGradientTexture, new GUILayoutOption[0]);
                    EditorGUI.indentLevel--;
                }
                else
                {
                    EditorGUILayout.PropertyField(this.m_Color, LightEditor.s_Styles.Color, new GUILayoutOption[0]);
                }
            }
            else
            {
                EditorGUILayout.PropertyField(this.m_Color, LightEditor.s_Styles.Color, new GUILayoutOption[0]);
            }
            EditorGUILayout.Space();
            this.LightUsageGUI();
            EditorGUILayout.PropertyField(this.m_Intensity, LightEditor.s_Styles.Intensity, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_AnimShowLightBounceIntensity.faded))
            {
                EditorGUILayout.PropertyField(this.m_BounceIntensity, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (this.bounceWarningValue)
            {
                EditorGUILayout.HelpBox(LightEditor.s_Styles.IndirectBounceShadowWarning.text, MessageType.Info);
            }
            this.ShadowsGUI();
            if (EditorGUILayout.BeginFadeGroup(this.m_AnimShowRuntimeOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_Cookie, LightEditor.s_Styles.Cookie, new GUILayoutOption[0]);
                if (this.cookieWarningValue)
                {
                    EditorGUILayout.HelpBox(LightEditor.s_Styles.CookieWarning.text, MessageType.Warning);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_AnimShowRuntimeOptions.faded * this.m_AnimShowDirOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_CookieSize, LightEditor.s_Styles.CookieSize, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Halo, LightEditor.s_Styles.DrawHalo, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Flare, LightEditor.s_Styles.Flare, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_RenderMode, LightEditor.s_Styles.RenderMode, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_CullingMask, LightEditor.s_Styles.CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            if (SceneView.lastActiveSceneView != null && !SceneView.lastActiveSceneView.m_SceneLighting)
            {
                EditorGUILayout.HelpBox(LightEditor.s_Styles.DisabledLightWarning.text, MessageType.Warning);
            }
            this.CommandBufferGUI();
            base.serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 3
0
 public override void OnInspectorGUI()
 {
     if (LightEditor.s_Styles == null)
     {
         LightEditor.s_Styles = new LightEditor.Styles();
     }
     this.serializedObject.Update();
     this.UpdateShowOptions(false);
     EditorGUILayout.PropertyField(this.m_Type);
     if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
     {
         EditorGUILayout.IntPopup(this.m_Lightmapping, LightEditor.s_Styles.LightmappingModes, LightEditor.s_Styles.LightmappingModeValues, LightEditor.s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
         if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
         {
             EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Enable Baked GI from Lighting window to use Baked or Mixed.").text, MessageType.Warning, false);
         }
         EditorGUILayout.EndFadeGroup();
     }
     EditorGUILayout.EndFadeGroup();
     EditorGUILayout.Space();
     if (EditorGUILayout.BeginFadeGroup(!this.m_ShowDirOptions.isAnimating || !this.m_ShowAreaOptions.isAnimating || !this.m_ShowDirOptions.target && !this.m_ShowAreaOptions.target ? 1f - Mathf.Max(this.m_ShowDirOptions.faded, this.m_ShowAreaOptions.faded) : 0.0f))
     {
         EditorGUILayout.PropertyField(this.m_Range);
     }
     EditorGUILayout.EndFadeGroup();
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
     {
         EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f);
     }
     EditorGUILayout.EndFadeGroup();
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
     {
         EditorGUILayout.PropertyField(this.m_AreaSizeX, EditorGUIUtility.TextContent("Width"), new GUILayoutOption[0]);
         EditorGUILayout.PropertyField(this.m_AreaSizeY, EditorGUIUtility.TextContent("Height"), new GUILayoutOption[0]);
     }
     EditorGUILayout.EndFadeGroup();
     EditorGUILayout.PropertyField(this.m_Color);
     EditorGUILayout.Slider(this.m_Intensity, 0.0f, 8f);
     EditorGUILayout.Slider(this.m_BounceIntensity, 0.0f, 8f, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
     {
         EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Currently realtime indirect bounce light shadowing for spot and point lights is not supported.").text, MessageType.Warning, false);
     }
     EditorGUILayout.EndFadeGroup();
     this.ShadowsGUI();
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
     {
         EditorGUILayout.PropertyField(this.m_Cookie);
     }
     EditorGUILayout.EndFadeGroup();
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
     {
         EditorGUILayout.PropertyField(this.m_CookieSize);
     }
     EditorGUILayout.EndFadeGroup();
     EditorGUILayout.PropertyField(this.m_Halo);
     EditorGUILayout.PropertyField(this.m_Flare);
     EditorGUILayout.PropertyField(this.m_RenderMode);
     EditorGUILayout.PropertyField(this.m_CullingMask);
     EditorGUILayout.Space();
     if ((Object)SceneView.currentDrawingSceneView != (Object)null && !SceneView.currentDrawingSceneView.m_SceneLighting)
     {
         EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("One of your scene views has lighting disabled, please keep this in mind when editing lighting.").text, MessageType.Warning, false);
     }
     this.serializedObject.ApplyModifiedProperties();
 }
Ejemplo n.º 4
0
        public override void OnInspectorGUI()
        {
            if (LightEditor.s_Styles == null)
            {
                LightEditor.s_Styles = new LightEditor.Styles();
            }
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            EditorGUILayout.PropertyField(this.m_Type, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.IntPopup(this.m_Lightmapping, LightEditor.s_Styles.LightmappingModes, LightEditor.s_Styles.LightmappingModeValues, LightEditor.s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
                {
                    GUIContent gUIContent = EditorGUIUtility.TextContent("Enable Baked GI from Lighting window to use Baked or Mixed.");
                    EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, false);
                }
                EditorGUILayout.EndFadeGroup();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Space();
            float value = 1f - this.m_ShowDirOptions.faded;

            if (EditorGUILayout.BeginFadeGroup(value))
            {
                if (this.m_ShowAreaOptions.target)
                {
                    GUI.enabled = false;
                    string     tooltip = "For area lights " + this.m_Range.displayName + " is computed from Width, Height and Intensity";
                    GUIContent label   = new GUIContent(this.m_Range.displayName, tooltip);
                    EditorGUILayout.FloatField(label, this.light.range, new GUILayoutOption[0]);
                    GUI.enabled = true;
                }
                else
                {
                    EditorGUILayout.PropertyField(this.m_Range, new GUILayoutOption[0]);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
            {
                EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_AreaSizeX, EditorGUIUtility.TextContent("Width"), new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_AreaSizeY, EditorGUIUtility.TextContent("Height"), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Color, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_Intensity, 0f, 8f, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_BounceIntensity, 0f, 8f, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
            {
                GUIContent gUIContent2 = EditorGUIUtility.TextContent("Currently realtime indirect bounce light shadowing for spot and point lights is not supported.");
                EditorGUILayout.HelpBox(gUIContent2.text, MessageType.Warning, false);
            }
            EditorGUILayout.EndFadeGroup();
            this.ShadowsGUI();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_Cookie, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowCookieWarning.faded))
                {
                    GUIContent gUIContent3 = EditorGUIUtility.TextContent("Cookie textures for spot lights should be set to clamp, not repeat, to avoid artifacts.");
                    EditorGUILayout.HelpBox(gUIContent3.text, MessageType.Warning, false);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_CookieSize, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Halo, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Flare, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            if (SceneView.currentDrawingSceneView != null && !SceneView.currentDrawingSceneView.m_SceneLighting)
            {
                GUIContent gUIContent4 = EditorGUIUtility.TextContent("One of your scene views has lighting disabled, please keep this in mind when editing lighting.");
                EditorGUILayout.HelpBox(gUIContent4.text, MessageType.Warning, false);
            }
            this.CommandBufferGUI();
            base.serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 5
0
		public override void OnInspectorGUI()
		{
			if (LightEditor.s_Styles == null)
			{
				LightEditor.s_Styles = new LightEditor.Styles();
			}
			base.serializedObject.Update();
			this.UpdateShowOptions(false);
			EditorGUILayout.PropertyField(this.m_Type, new GUILayoutOption[0]);
			if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
			{
				EditorGUILayout.IntPopup(this.m_Lightmapping, LightEditor.s_Styles.LightmappingModes, LightEditor.s_Styles.LightmappingModeValues, LightEditor.s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
				if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
				{
					GUIContent gUIContent = EditorGUIUtility.TextContent("LightEditor.GIBakingDisabledWarning");
					EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, false);
				}
				EditorGUILayout.EndFadeGroup();
			}
			EditorGUILayout.EndFadeGroup();
			EditorGUILayout.Space();
			bool flag = this.m_ShowDirOptions.isAnimating && this.m_ShowAreaOptions.isAnimating && (this.m_ShowDirOptions.target || this.m_ShowAreaOptions.target);
			float value = (!flag) ? (1f - Mathf.Max(this.m_ShowDirOptions.faded, this.m_ShowAreaOptions.faded)) : 0f;
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaWarning.faded))
			{
				GUIContent gUIContent2 = EditorGUIUtility.TextContent("LightEditor.AreaLightsProOnly");
				EditorGUILayout.HelpBox(gUIContent2.text, MessageType.Warning, false);
			}
			EditorGUILayout.EndFadeGroup();
			if (EditorGUILayout.BeginFadeGroup(value))
			{
				EditorGUILayout.PropertyField(this.m_Range, new GUILayoutOption[0]);
			}
			EditorGUILayout.EndFadeGroup();
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
			{
				EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, new GUILayoutOption[0]);
			}
			EditorGUILayout.EndFadeGroup();
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
			{
				EditorGUILayout.PropertyField(this.m_AreaSizeX, new GUIContent("Width"), new GUILayoutOption[0]);
				EditorGUILayout.PropertyField(this.m_AreaSizeY, new GUIContent("Height"), new GUILayoutOption[0]);
			}
			EditorGUILayout.EndFadeGroup();
			EditorGUILayout.PropertyField(this.m_Color, new GUILayoutOption[0]);
			EditorGUILayout.Slider(this.m_Intensity, 0f, 8f, new GUILayoutOption[0]);
			EditorGUILayout.Slider(this.m_BounceIntensity, 0f, 8f, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
			{
				GUIContent gUIContent3 = EditorGUIUtility.TextContent("LightEditor.NoIndirectShadowsWarnings");
				EditorGUILayout.HelpBox(gUIContent3.text, MessageType.Warning, false);
			}
			EditorGUILayout.EndFadeGroup();
			this.ShadowsGUI();
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
			{
				EditorGUILayout.PropertyField(this.m_Cookie, new GUILayoutOption[0]);
			}
			EditorGUILayout.EndFadeGroup();
			if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
			{
				EditorGUILayout.PropertyField(this.m_CookieSize, new GUILayoutOption[0]);
			}
			EditorGUILayout.EndFadeGroup();
			EditorGUILayout.PropertyField(this.m_Halo, new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(this.m_Flare, new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
			EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
			EditorGUILayout.Space();
			if (SceneView.currentDrawingSceneView != null && !SceneView.currentDrawingSceneView.m_SceneLighting)
			{
				GUIContent gUIContent4 = EditorGUIUtility.TextContent("LightEditor.LightingDisabledInSceneViewWarning");
				EditorGUILayout.HelpBox(gUIContent4.text, MessageType.Warning, false);
			}
			base.serializedObject.ApplyModifiedProperties();
		}
Ejemplo n.º 6
0
 public override void OnInspectorGUI()
 {
   if (LightEditor.s_Styles == null)
     LightEditor.s_Styles = new LightEditor.Styles();
   this.serializedObject.Update();
   this.UpdateShowOptions(false);
   EditorGUILayout.PropertyField(this.m_Type);
   if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
   {
     EditorGUILayout.IntPopup(this.m_Lightmapping, LightEditor.s_Styles.LightmappingModes, LightEditor.s_Styles.LightmappingModeValues, LightEditor.s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
       EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Enable Baked GI from Lighting window to use Baked or Mixed.").text, MessageType.Warning, false);
     EditorGUILayout.EndFadeGroup();
   }
   EditorGUILayout.EndFadeGroup();
   EditorGUILayout.Space();
   if (EditorGUILayout.BeginFadeGroup(!this.m_ShowDirOptions.isAnimating || !this.m_ShowAreaOptions.isAnimating || !this.m_ShowDirOptions.target && !this.m_ShowAreaOptions.target ? 1f - Mathf.Max(this.m_ShowDirOptions.faded, this.m_ShowAreaOptions.faded) : 0.0f))
     EditorGUILayout.PropertyField(this.m_Range);
   EditorGUILayout.EndFadeGroup();
   if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
     EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f);
   EditorGUILayout.EndFadeGroup();
   if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
   {
     EditorGUILayout.PropertyField(this.m_AreaSizeX, EditorGUIUtility.TextContent("Width"), new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_AreaSizeY, EditorGUIUtility.TextContent("Height"), new GUILayoutOption[0]);
   }
   EditorGUILayout.EndFadeGroup();
   EditorGUILayout.PropertyField(this.m_Color);
   EditorGUILayout.Slider(this.m_Intensity, 0.0f, 8f);
   EditorGUILayout.Slider(this.m_BounceIntensity, 0.0f, 8f, LightEditor.s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
   if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
     EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Currently realtime indirect bounce light shadowing for spot and point lights is not supported.").text, MessageType.Warning, false);
   EditorGUILayout.EndFadeGroup();
   this.ShadowsGUI();
   if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
     EditorGUILayout.PropertyField(this.m_Cookie);
   EditorGUILayout.EndFadeGroup();
   if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
     EditorGUILayout.PropertyField(this.m_CookieSize);
   EditorGUILayout.EndFadeGroup();
   EditorGUILayout.PropertyField(this.m_Halo);
   EditorGUILayout.PropertyField(this.m_Flare);
   EditorGUILayout.PropertyField(this.m_RenderMode);
   EditorGUILayout.PropertyField(this.m_CullingMask);
   EditorGUILayout.Space();
   if ((Object) SceneView.currentDrawingSceneView != (Object) null && !SceneView.currentDrawingSceneView.m_SceneLighting)
     EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("One of your scene views has lighting disabled, please keep this in mind when editing lighting.").text, MessageType.Warning, false);
   this.serializedObject.ApplyModifiedProperties();
 }