docs.unity3d.com
    显示 / 隐藏目录

    Class CustomPassDrawer

    Custom UI class for custom passes

    Inheritance
    Object
    CustomPassDrawer
    Namespace: UnityEditor.Rendering.HighDefinition
    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

    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
    Single

    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

    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)