docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CustomPassDrawer

    Custom UI class for custom passes

    Inheritance
    object
    CustomPassDrawer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Editor.dll
    Syntax
    [CustomPassDrawer(typeof(CustomPass))]
    public class CustomPassDrawer

    Properties

    commonPassUIFlags

    Controls which field of the common pass UI is displayed.

    Declaration
    protected virtual CustomPassDrawer.PassUIFlag commonPassUIFlags { get; }
    Property Value
    Type Description
    CustomPassDrawer.PassUIFlag

    target

    Get the current instance of the custom pass being displayed in the Custom Pass Volume Editor.

    Declaration
    protected CustomPass target { get; }
    Property Value
    Type Description
    CustomPass

    Methods

    DoPassGUI(SerializedProperty, Rect)

    Implement this function to draw your custom GUI.

    Declaration
    protected virtual void DoPassGUI(SerializedProperty customPass, Rect rect)
    Parameters
    Type Name Description
    SerializedProperty customPass

    Your custom pass instance represented as a SerializedProperty

    Rect rect

    space available for you to draw the UI

    GetPassHeight(SerializedProperty)

    Implement this functions if you implement DoPassGUI. The result of this function must match the number of lines displayed in your custom GUI. Note that this height can be dynamic.

    Declaration
    protected virtual float GetPassHeight(SerializedProperty customPass)
    Parameters
    Type Name Description
    SerializedProperty customPass

    Your custom pass instance represented as a SerializedProperty

    Returns
    Type Description
    float

    The height in pixels of tour custom pass GUI

    Initialize(SerializedProperty)

    Use this function to initialize the local SerializedProperty you will use in your pass.

    Declaration
    protected virtual void Initialize(SerializedProperty customPass)
    Parameters
    Type Name Description
    SerializedProperty customPass

    Your custom pass instance represented as a SerializedProperty

    In This Article
    Back to top
    Copyright © 2024 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)