You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
819 B

using System;
using System.Linq.Expressions;
using UnityEngine.PostProcessing;
namespace UnityEditor.PostProcessing
{
[CustomEditor(typeof(PostProcessingBehaviour))]
public class PostProcessingBehaviourEditor : Editor
{
SerializedProperty m_Profile;
public void OnEnable()
{
m_Profile = FindSetting((PostProcessingBehaviour x) => x.profile);
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(m_Profile);
serializedObject.ApplyModifiedProperties();
}
SerializedProperty FindSetting<T, TValue>(Expression<Func<T, TValue>> expr)
{
return serializedObject.FindProperty(ReflectionUtils.GetFieldPath(expr));
}
}
}