少年修仙传客户端基础资源
hzr
2018-08-11 709d24f9c2070e9118ff298ff74e66fd38fae27d
Assets/Plugins/PostProcessing/Editor/PostProcessingBehaviourEditor.cs
@@ -1,31 +1,31 @@
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));
        }
    }
}
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));
        }
    }
}