您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
44 行
1.4 KiB
44 行
1.4 KiB
using System.Collections;
|
|
using UnityEngine;
|
|
using UnityEngine.Experimental.Rendering.HDPipeline;
|
|
|
|
namespace UnityEditor.Experimental.Rendering.HDPipeline
|
|
{
|
|
[CanEditMultipleObjects]
|
|
[VolumeComponentEditor(typeof(ScreenSpaceReflection))]
|
|
public class HDScreenSpaceReflectionEditor : ScreenSpaceLightingEditor
|
|
{
|
|
SerializedDataParameter m_DeferredProjectionModel;
|
|
|
|
public override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
|
|
var o = new PropertyFetcher<ScreenSpaceReflection>(serializedObject);
|
|
m_DeferredProjectionModel = Unpack(o.Find(x => x.deferredProjectionModel));
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
OnCommonInspectorGUI();
|
|
var projectionModel = (Lit.ProjectionModel)m_DeferredProjectionModel.value.enumValueIndex;
|
|
switch (projectionModel)
|
|
{
|
|
case Lit.ProjectionModel.HiZ:
|
|
EditorGUILayout.Separator();
|
|
OnHiZInspectorGUI();
|
|
break;
|
|
case Lit.ProjectionModel.Proxy:
|
|
EditorGUILayout.Separator();
|
|
OnProxyInspectorGUI();
|
|
break;
|
|
}
|
|
}
|
|
|
|
protected override void OnCommonInspectorGUI()
|
|
{
|
|
base.OnCommonInspectorGUI();
|
|
PropertyField(m_DeferredProjectionModel, CoreEditorUtils.GetContent("Projection Model"));
|
|
}
|
|
}
|
|
}
|