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

36 行
1.1 KiB

using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
[CustomEditor(typeof(HDRenderPipelineAsset))]
public sealed class HDRenderPipelineEditor : Editor
{
SerializedHDRenderPipelineAsset m_SerializedHDRenderPipeline;
HDRenderPipelineUI m_HDRenderPipelineUI = new HDRenderPipelineUI();
void OnEnable()
{
m_SerializedHDRenderPipeline = new SerializedHDRenderPipelineAsset(serializedObject);
m_HDRenderPipelineUI.Reset(m_SerializedHDRenderPipeline, Repaint);
}
public override void OnInspectorGUI()
{
var hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
if (hdPipeline == null)
return;
var s = m_HDRenderPipelineUI;
var d = m_SerializedHDRenderPipeline;
var o = this;
s.Update();
d.Update();
HDRenderPipelineUI.Inspector.Draw(s, d, o);
d.Apply();
}
}
}