Firstborn/Library/PackageCache/com.unity.postprocessing@3.2.2/PostProcessing/Editor/PostProcessProfileEditor.cs

30 lines
742 B
C#
Raw Normal View History

2023-03-28 13:24:16 -04:00
using UnityEngine.Rendering.PostProcessing;
namespace UnityEditor.Rendering.PostProcessing
{
[CustomEditor(typeof(PostProcessProfile))]
sealed class PostProcessProfileEditor : Editor
{
EffectListEditor m_EffectList;
void OnEnable()
{
m_EffectList = new EffectListEditor(this);
m_EffectList.Init(target as PostProcessProfile, serializedObject);
}
void OnDisable()
{
if (m_EffectList != null)
m_EffectList.Clear();
}
public override void OnInspectorGUI()
{
serializedObject.Update();
m_EffectList.OnGUI();
serializedObject.ApplyModifiedProperties();
}
}
}