docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PostProcessEffectEditor<T>

    The class to inherit from when designing custom effect editors.

    Inheritance
    object
    PostProcessEffectBaseEditor
    PostProcessEffectEditor<T>
    Inherited Members
    PostProcessEffectBaseEditor.Repaint()
    PostProcessEffectBaseEditor.OnEnable()
    PostProcessEffectBaseEditor.OnDisable()
    PostProcessEffectBaseEditor.OnInspectorGUI()
    PostProcessEffectBaseEditor.GetDisplayTitle()
    PostProcessEffectBaseEditor.PropertyField(SerializedParameterOverride)
    PostProcessEffectBaseEditor.PropertyField(SerializedParameterOverride, GUIContent)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering.PostProcessing
    Assembly: Unity.Postprocessing.Editor.dll
    Syntax
    public class PostProcessEffectEditor<T> : PostProcessEffectBaseEditor where T : PostProcessEffectSettings
    Type Parameters
    Name Description
    T

    The effect type to create an editor for

    Methods

    FindParameterOverride<TValue>(Expression<Func<T, TValue>>)

    Find a serialized parameter override using an expression instead of a string. This is safer as it helps avoiding typos and make code refactoring easier.

    Declaration
    protected SerializedParameterOverride FindParameterOverride<TValue>(Expression<Func<T, TValue>> expr)
    Parameters
    Type Name Description
    Expression<Func<T, TValue>> expr

    The expression to parse to reach the parameter override

    Returns
    Type Description
    SerializedParameterOverride

    A SerializedParameterOverride or null if none was found

    Type Parameters
    Name Description
    TValue

    The serialized value type

    Examples
    [Serializable]
    public class MyEffect : PostProcessEffectSettings
    {
        public FloatParameter myParameter = new FloatParameter { value = 1f };
    }
    
    [PostProcessEditor(typeof(MyEffect))]
    public class MyEffectEditor : PostProcessEffectEditor<MyEffect>
    {
        SerializedParameterOverride m_MyParameter;
    
        public override void OnEnable()
        {
            m_MyParameter = FindParameterOverride(x => x.myParameter);
        }
    }
    See Also
    SerializedParameterOverride

    FindProperty<TValue>(Expression<Func<T, TValue>>)

    Find a serialized property using an expression instead of a string. This is safer as it helps avoiding typos and make code refactoring easier.

    Declaration
    protected SerializedProperty FindProperty<TValue>(Expression<Func<T, TValue>> expr)
    Parameters
    Type Name Description
    Expression<Func<T, TValue>> expr

    The expression to parse to reach the property

    Returns
    Type Description
    SerializedProperty

    A SerializedProperty or null if none was found

    Type Parameters
    Name Description
    TValue

    The serialized value type

    Remarks

    If you're trying to retrieve a SerializedParameterOverride, you should use FindParameterOverride<TValue>(Expression<Func<T, TValue>>) instead.

    Examples
    [Serializable]
    public class MyEffect : PostProcessEffectSettings
    {
        public float myParameter = 1f;
    }
    
    [PostProcessEditor(typeof(MyEffect))]
    public class MyEffectEditor : PostProcessEffectEditor<MyEffect>
    {
        SerializedProperty m_MyParameter;
    
        public override void OnEnable()
        {
            m_MyParameter = FindProperty(x => x.myParameter);
        }
    }
    See Also
    SerializedProperty
    FindParameterOverride<TValue>(Expression<Func<T, TValue>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)