您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
42 行
1.2 KiB
42 行
1.2 KiB
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEngine.Experimental.Rendering.HDPipeline;
|
|
|
|
namespace UnityEditor.Experimental.Rendering.HDPipeline
|
|
{
|
|
[CanEditMultipleObjects]
|
|
[VolumeComponentEditor(typeof(GradientSky))]
|
|
public class GradientSkySettingsEditor : SkySettingsEditor
|
|
{
|
|
SerializedDataParameter m_Bottom;
|
|
SerializedDataParameter m_Middle;
|
|
SerializedDataParameter m_Top;
|
|
SerializedDataParameter m_GradientMultiplier;
|
|
|
|
public override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
|
|
var o = new PropertyFetcher<GradientSky>(serializedObject);
|
|
|
|
m_Bottom = Unpack(o.Find(x => x.bottom));
|
|
m_Middle = Unpack(o.Find(x => x.middle));
|
|
m_Top = Unpack(o.Find(x => x.top));
|
|
m_GradientMultiplier = Unpack(o.Find(x => x.gradientDiffusion));
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
PropertyField(m_Top);
|
|
PropertyField(m_Middle);
|
|
PropertyField(m_Bottom);
|
|
PropertyField(m_GradientMultiplier);
|
|
|
|
EditorGUILayout.Space();
|
|
|
|
m_CommonUIElementsMask = (uint)SkySettingsUIElement.UpdateMode;
|
|
|
|
base.CommonSkySettingsGUI();
|
|
}
|
|
}
|
|
}
|