您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
39 行
1.2 KiB
39 行
1.2 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEditor.Experimental.Rendering;
|
|
using UnityEngine.Experimental.Rendering.HDPipeline;
|
|
|
|
namespace UnityEditor.Experimental.Rendering.HDPipeline
|
|
{
|
|
[VolumeComponentEditor(typeof(LinearFog))]
|
|
public class LinearFogEditor : AtmosphericScatteringEditor
|
|
{
|
|
private SerializedDataParameter m_FogStart;
|
|
private SerializedDataParameter m_FogEnd;
|
|
private SerializedDataParameter m_FogHeightStart;
|
|
private SerializedDataParameter m_FogHeightEnd;
|
|
|
|
public override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
var o = new PropertyFetcher<LinearFog>(serializedObject);
|
|
|
|
m_FogStart = Unpack(o.Find(x => x.fogStart));
|
|
m_FogEnd = Unpack(o.Find(x => x.fogEnd));
|
|
m_FogHeightStart = Unpack(o.Find(x => x.fogHeightStart));
|
|
m_FogHeightEnd = Unpack(o.Find(x => x.fogHeightEnd));
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
base.OnInspectorGUI();
|
|
|
|
PropertyField(m_FogStart);
|
|
PropertyField(m_FogEnd);
|
|
PropertyField(m_FogHeightStart);
|
|
PropertyField(m_FogHeightEnd);
|
|
}
|
|
}
|
|
}
|