您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

50 行
1.7 KiB

using UnityEngine;
using UnityEditor;
using UnityEngine.Experimental.Rendering.HDPipeline;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
[CanEditMultipleObjects]
[VolumeComponentEditor(typeof(ProceduralSky))]
public class ProceduralSkySettingsEditor
: SkySettingsEditor
{
SerializedDataParameter m_SunSize;
SerializedDataParameter m_SunSizeConvergence;
SerializedDataParameter m_AtmosphericThickness;
SerializedDataParameter m_SkyTint;
SerializedDataParameter m_GroundColor;
SerializedDataParameter m_EnableSunDisk;
public override void OnEnable()
{
base.OnEnable();
// Procedural sky orientation depends on the sun direction
m_CommonUIElementsMask = 0xFFFFFFFF & ~(uint)(SkySettingsUIElement.Rotation);
var o = new PropertyFetcher<ProceduralSky>(serializedObject);
m_SunSize = Unpack(o.Find(x => x.sunSize));
m_SunSizeConvergence = Unpack(o.Find(x => x.sunSizeConvergence));
m_AtmosphericThickness = Unpack(o.Find(x => x.atmosphereThickness));
m_SkyTint = Unpack(o.Find(x => x.skyTint));
m_GroundColor = Unpack(o.Find(x => x.groundColor));
m_EnableSunDisk = Unpack(o.Find(x => x.enableSunDisk));
}
public override void OnInspectorGUI()
{
PropertyField(m_EnableSunDisk);
PropertyField(m_SunSize);
PropertyField(m_SunSizeConvergence);
PropertyField(m_AtmosphericThickness);
PropertyField(m_SkyTint);
PropertyField(m_GroundColor);
EditorGUILayout.Space();
base.CommonSkySettingsGUI();
}
}
}