|
|
|
|
|
|
public SerializedProperty directionalIntensity; |
|
|
|
public SerializedProperty punctualIntensity; |
|
|
|
public SerializedProperty areaIntensity; |
|
|
|
public SerializedProperty enableSpotReflector; |
|
|
|
public SerializedProperty spotInnerPercent; |
|
|
|
public SerializedProperty lightDimmer; |
|
|
|
public SerializedProperty fadeDistance; |
|
|
|
|
|
|
public SerializedProperty spotLightShape; |
|
|
|
public SerializedProperty enableSpotReflector; |
|
|
|
public SerializedProperty shapeWidth; |
|
|
|
public SerializedProperty shapeHeight; |
|
|
|
public SerializedProperty aspectRatio; |
|
|
|
|
|
|
directionalIntensity = o.Find(x => x.directionalIntensity), |
|
|
|
punctualIntensity = o.Find(x => x.punctualIntensity), |
|
|
|
areaIntensity = o.Find(x => x.areaIntensity), |
|
|
|
enableSpotReflector = o.Find(x => x.enableSpotReflector), |
|
|
|
spotInnerPercent = o.Find(x => x.m_InnerSpotPercent), |
|
|
|
lightDimmer = o.Find(x => x.lightDimmer), |
|
|
|
fadeDistance = o.Find(x => x.fadeDistance), |
|
|
|
|
|
|
spotLightShape = o.Find(x => x.spotLightShape), |
|
|
|
enableSpotReflector = o.Find(x => x.enableSpotReflector), |
|
|
|
spotLightShape = o.Find(x => x.spotLightShape), |
|
|
|
shapeWidth = o.Find(x => x.shapeWidth), |
|
|
|
shapeHeight = o.Find(x => x.shapeHeight), |
|
|
|
aspectRatio = o.Find(x => x.aspectRatio), |
|
|
|
|
|
|
if (spotLightShape == SpotLightShape.Cone) |
|
|
|
{ |
|
|
|
settings.DrawSpotAngle(); |
|
|
|
EditorGUILayout.PropertyField(m_AdditionalLightData.enableSpotReflector, s_Styles.enableSpotReflector); |
|
|
|
EditorGUILayout.Slider(m_AdditionalLightData.spotInnerPercent, 0f, 100f, s_Styles.spotInnerPercent); |
|
|
|
} |
|
|
|
// TODO : replace with angle and ratio
|
|
|
|
|
|
|
EditorGUILayout.PropertyField(m_AdditionalLightData.enableSpotReflector, s_Styles.enableSpotReflector); |
|
|
|
EditorGUILayout.Slider(m_AdditionalLightData.aspectRatio, 0.05f, 20.0f, s_Styles.aspectRatioPyramid); |
|
|
|
} |
|
|
|
else if (spotLightShape == SpotLightShape.Box) |
|
|
|
|
|
|
case LightShape.Point: |
|
|
|
case LightShape.Spot: |
|
|
|
EditorGUILayout.PropertyField(m_AdditionalLightData.punctualIntensity, s_Styles.punctualIntensity); |
|
|
|
|
|
|
|
// Only display reflector option if it make sense
|
|
|
|
if (m_LightShape == LightShape.Spot) |
|
|
|
{ |
|
|
|
var spotLightShape = (SpotLightShape)m_AdditionalLightData.spotLightShape.enumValueIndex; |
|
|
|
if (spotLightShape == SpotLightShape.Cone || spotLightShape == SpotLightShape.Pyramid) |
|
|
|
EditorGUILayout.PropertyField(m_AdditionalLightData.enableSpotReflector, s_Styles.enableSpotReflector); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case LightShape.Rectangle: |
|
|
|