Skip to content

Commit e5cfc6d

Browse files
author
Unity Technologies
committed
Unity 2018.1.7f1 C# reference source code
1 parent e4d03f2 commit e5cfc6d

14 files changed

Lines changed: 14 additions & 10 deletions

File tree

Editor/Mono/Commands/GOCreationCommands.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ static void CreateAreaLight(MenuCommand menuCommand)
183183
var go = CreateGameObject(null, "Area Light", typeof(Light));
184184

185185
go.GetComponent<Light>().type = LightType.Area;
186+
go.GetComponent<Light>().shadows = LightShadows.Soft;
186187
go.GetComponent<Transform>().SetLocalEulerAngles(new Vector3(90, 0, 0), RotationOrder.OrderZXY);
187188

188189
Place(go, parent);

Editor/Mono/Inspector/LightEditor.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -580,16 +580,11 @@ public override void OnInspectorGUI()
580580
void ShadowsGUI()
581581
{
582582
//NOTE: FadeGroup's dont support nesting. Thus we just multiply the fade values here.
583-
584-
// Shadows drop-down. Area lights can only be baked and always have shadows.
585-
float show = 1 - m_AnimShowAreaOptions.faded;
586-
587-
if (EditorGUILayout.BeginFadeGroup(show))
588-
settings.DrawShadowsType();
589-
EditorGUILayout.EndFadeGroup();
583+
settings.DrawShadowsType();
590584

591585
EditorGUI.indentLevel += 1;
592-
show *= m_AnimShowShadowOptions.faded;
586+
587+
float show = m_AnimShowAreaOptions.faded;
593588

594589
// Baked Shadow radius
595590
if (EditorGUILayout.BeginFadeGroup(show * m_AnimBakedShadowRadiusOptions.faded))
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)