Class CoreEditorDrawer<TData> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class CoreEditorDrawer<TData>

    Utility class to draw inspectors

    Inheritance
    System.Object
    CoreEditorDrawer<TData>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEditor.Experimental.Rendering
    Syntax
    public static class CoreEditorDrawer<TData>
    Type Parameters
    Name Description
    TData

    Type of class containing data needed to draw inspector

    Fields

    noop

    Use it when IDrawer required but no operation should be done

    Declaration
    public static readonly CoreEditorDrawer<TData>.IDrawer noop
    Field Value
    Type Description
    CoreEditorDrawer.IDrawer<>

    space

    Equivalent to EditorGUILayout.Space that can be put in a drawer group

    Declaration
    public static readonly CoreEditorDrawer<TData>.IDrawer space
    Field Value
    Type Description
    CoreEditorDrawer.IDrawer<>

    Methods

    AdvancedFoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.SwitchEnabler, CoreEditorDrawer<TData>.ActionDrawer, CoreEditorDrawer<TData>.ActionDrawer, FoldoutOption)

    Helper to draw a foldout with an advanced switch on it.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer AdvancedFoldoutGroup<TEnum, TState>(GUIContent foldoutTitle, TEnum foldoutMask, ExpandedState<TEnum, TState> foldoutState, CoreEditorDrawer<TData>.Enabler isAdvanced, CoreEditorDrawer<TData>.SwitchEnabler switchAdvanced, CoreEditorDrawer<TData>.ActionDrawer normalContent, CoreEditorDrawer<TData>.ActionDrawer advancedContent, FoldoutOption options = FoldoutOption.Indent)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent foldoutTitle
    TEnum foldoutMask
    ExpandedState<TEnum, TState> foldoutState
    CoreEditorDrawer.Enabler<> isAdvanced

    Delegate allowing to check if advanced mode is active.

    CoreEditorDrawer.SwitchEnabler<> switchAdvanced

    Delegate to know what to do when advance is switched.

    CoreEditorDrawer.ActionDrawer<> normalContent

    The content of the foldout header always visible if expended.

    CoreEditorDrawer.ActionDrawer<> advancedContent

    The content of the foldout header only visible if advanced mode is active and if foldout is expended.

    FoldoutOption options
    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    AdvancedFoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.SwitchEnabler, CoreEditorDrawer<TData>.ActionDrawer, CoreEditorDrawer<TData>.IDrawer, FoldoutOption)

    Helper to draw a foldout with an advanced switch on it.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer AdvancedFoldoutGroup<TEnum, TState>(GUIContent foldoutTitle, TEnum foldoutMask, ExpandedState<TEnum, TState> foldoutState, CoreEditorDrawer<TData>.Enabler isAdvanced, CoreEditorDrawer<TData>.SwitchEnabler switchAdvanced, CoreEditorDrawer<TData>.ActionDrawer normalContent, CoreEditorDrawer<TData>.IDrawer advancedContent, FoldoutOption options = FoldoutOption.Indent)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent foldoutTitle
    TEnum foldoutMask
    ExpandedState<TEnum, TState> foldoutState
    CoreEditorDrawer.Enabler<> isAdvanced

    Delegate allowing to check if advanced mode is active.

    CoreEditorDrawer.SwitchEnabler<> switchAdvanced

    Delegate to know what to do when advance is switched.

    CoreEditorDrawer.ActionDrawer<> normalContent

    The content of the foldout header always visible if expended.

    CoreEditorDrawer.IDrawer<> advancedContent

    The content of the foldout header only visible if advanced mode is active and if foldout is expended.

    FoldoutOption options
    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    AdvancedFoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.SwitchEnabler, CoreEditorDrawer<TData>.IDrawer, CoreEditorDrawer<TData>.ActionDrawer, FoldoutOption)

    Helper to draw a foldout with an advanced switch on it.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer AdvancedFoldoutGroup<TEnum, TState>(GUIContent foldoutTitle, TEnum foldoutMask, ExpandedState<TEnum, TState> foldoutState, CoreEditorDrawer<TData>.Enabler isAdvanced, CoreEditorDrawer<TData>.SwitchEnabler switchAdvanced, CoreEditorDrawer<TData>.IDrawer normalContent, CoreEditorDrawer<TData>.ActionDrawer advancedContent, FoldoutOption options = FoldoutOption.Indent)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent foldoutTitle
    TEnum foldoutMask
    ExpandedState<TEnum, TState> foldoutState
    CoreEditorDrawer.Enabler<> isAdvanced

    Delegate allowing to check if advanced mode is active.

    CoreEditorDrawer.SwitchEnabler<> switchAdvanced

    Delegate to know what to do when advance is switched.

    CoreEditorDrawer.IDrawer<> normalContent

    The content of the foldout header always visible if expended.

    CoreEditorDrawer.ActionDrawer<> advancedContent

    The content of the foldout header only visible if advanced mode is active and if foldout is expended.

    FoldoutOption options
    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    AdvancedFoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.SwitchEnabler, CoreEditorDrawer<TData>.IDrawer, CoreEditorDrawer<TData>.IDrawer, FoldoutOption)

    Helper to draw a foldout with an advanced switch on it.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer AdvancedFoldoutGroup<TEnum, TState>(GUIContent foldoutTitle, TEnum foldoutMask, ExpandedState<TEnum, TState> foldoutState, CoreEditorDrawer<TData>.Enabler isAdvanced, CoreEditorDrawer<TData>.SwitchEnabler switchAdvanced, CoreEditorDrawer<TData>.IDrawer normalContent, CoreEditorDrawer<TData>.IDrawer advancedContent, FoldoutOption options = FoldoutOption.Indent)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent foldoutTitle
    TEnum foldoutMask
    ExpandedState<TEnum, TState> foldoutState
    CoreEditorDrawer.Enabler<> isAdvanced

    Delegate allowing to check if advanced mode is active.

    CoreEditorDrawer.SwitchEnabler<> switchAdvanced

    Delegate to know what to do when advance is switched.

    CoreEditorDrawer.IDrawer<> normalContent

    The content of the foldout header always visible if expended.

    CoreEditorDrawer.IDrawer<> advancedContent

    The content of the foldout header only visible if advanced mode is active and if foldout is expended.

    FoldoutOption options
    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    Conditional(CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.ActionDrawer[])

    Conditioned drawer that will only be drawn if its enabler function is null or return true

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Conditional(CoreEditorDrawer<TData>.Enabler enabler, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.Enabler<> enabler

    Enable the drawing if null or return true

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Conditional(CoreEditorDrawer<TData>.Enabler, CoreEditorDrawer<TData>.IDrawer[])

    Conditioned drawer that will only be drawn if its enabler function is null or return true

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Conditional(CoreEditorDrawer<TData>.Enabler enabler, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.Enabler<> enabler

    Enable the drawing if null or return true

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    FoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.ActionDrawer[])

    Create an IDrawer foldout header using an ExpandedState. The default option is Indent in this version.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(GUIContent title, TEnum mask, ExpandedState<TEnum, TState> state, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.IDrawer[])

    Create an IDrawer foldout header using an ExpandedState. The default option is Indent in this version.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(GUIContent title, TEnum mask, ExpandedState<TEnum, TState> state, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, FoldoutOption, CoreEditorDrawer<TData>.ActionDrawer[])

    Create an IDrawer foldout header using an ExpandedState

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(GUIContent title, TEnum mask, ExpandedState<TEnum, TState> state, FoldoutOption options, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    FoldoutOption options
    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(GUIContent, TEnum, ExpandedState<TEnum, TState>, FoldoutOption, CoreEditorDrawer<TData>.IDrawer[])

    Create an IDrawer foldout header using an ExpandedState

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(GUIContent title, TEnum mask, ExpandedState<TEnum, TState> state, FoldoutOption options, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    GUIContent title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    FoldoutOption options
    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(String, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.ActionDrawer[])

    Create an IDrawer foldout header using an ExpandedState. The default option is Indent in this version.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(string title, TEnum mask, ExpandedState<TEnum, TState> state, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(String, TEnum, ExpandedState<TEnum, TState>, CoreEditorDrawer<TData>.IDrawer[])

    Create an IDrawer foldout header using an ExpandedState. The default option is Indent in this version.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(string title, TEnum mask, ExpandedState<TEnum, TState> state, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(String, TEnum, ExpandedState<TEnum, TState>, FoldoutOption, CoreEditorDrawer<TData>.ActionDrawer[])

    Create an IDrawer foldout header using an ExpandedState

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(string title, TEnum mask, ExpandedState<TEnum, TState> state, FoldoutOption options, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    FoldoutOption options
    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    FoldoutGroup<TEnum, TState>(String, TEnum, ExpandedState<TEnum, TState>, FoldoutOption, CoreEditorDrawer<TData>.IDrawer[])

    Create an IDrawer foldout header using an ExpandedState

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer FoldoutGroup<TEnum, TState>(string title, TEnum mask, ExpandedState<TEnum, TState> state, FoldoutOption options, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String title

    Title wanted for this foldout header

    TEnum mask

    Bit mask (enum) used to define the boolean saving the state in ExpandedState

    ExpandedState<TEnum, TState> state

    The ExpandedState describing the component

    FoldoutOption options
    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the foldout header

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    TEnum
    TState

    Group(Single, CoreEditorDrawer<TData>.ActionDrawer[])

    Group of drawing function for inspector with a set width for labels

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(float labelWidth, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)
    Parameters
    Type Name Description
    System.Single labelWidth

    Width used for all labels in the group

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(Single, CoreEditorDrawer<TData>.IDrawer[])

    Group of drawing function for inspector with a set width for labels

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(float labelWidth, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)
    Parameters
    Type Name Description
    System.Single labelWidth

    Width used for all labels in the group

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(Single, GroupOption, CoreEditorDrawer<TData>.ActionDrawer[])

    Group of drawing function for inspector with a set width for labels

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(float labelWidth, GroupOption options, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)
    Parameters
    Type Name Description
    System.Single labelWidth

    Width used for all labels in the group

    GroupOption options

    Allow to add indentation on this group

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(Single, GroupOption, CoreEditorDrawer<TData>.IDrawer[])

    Group of drawing function for inspector with a set width for labels

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(float labelWidth, GroupOption options, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)
    Parameters
    Type Name Description
    System.Single labelWidth

    Width used for all labels in the group

    GroupOption options

    Allow to add indentation on this group

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(CoreEditorDrawer<TData>.ActionDrawer[])

    Group of drawing function for inspector. They will be drawn one after the other.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(CoreEditorDrawer<TData>.IDrawer[])

    Group of drawing function for inspector. They will be drawn one after the other.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(GroupOption, CoreEditorDrawer<TData>.ActionDrawer[])

    Group of drawing function for inspector. They will be drawn one after the other.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(GroupOption options, params CoreEditorDrawer<TData>.ActionDrawer[] contentDrawers)
    Parameters
    Type Name Description
    GroupOption options

    Allow to add indentation on this group

    CoreEditorDrawer.ActionDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Group(GroupOption, CoreEditorDrawer<TData>.IDrawer[])

    Group of drawing function for inspector. They will be drawn one after the other.

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Group(GroupOption options, params CoreEditorDrawer<TData>.IDrawer[] contentDrawers)
    Parameters
    Type Name Description
    GroupOption options

    Allow to add indentation on this group

    CoreEditorDrawer.IDrawer<>[] contentDrawers

    The content of the group

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>

    Select<T2Data>(CoreEditorDrawer<TData>.DataSelect<T2Data>, CoreEditorDrawer<T2Data>.ActionDrawer[])

    Create an IDrawer based on an other data container

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Select<T2Data>(CoreEditorDrawer<TData>.DataSelect<T2Data> dataSelect, params CoreEditorDrawer<T2Data>.ActionDrawer[] otherDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.DataSelect<T2Data> dataSelect

    The data new source for the inner drawers

    CoreEditorDrawer.ActionDrawer<>[] otherDrawers

    Inner drawers drawed with given data sources

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    T2Data

    Select<T2Data>(CoreEditorDrawer<TData>.DataSelect<T2Data>, CoreEditorDrawer<T2Data>.IDrawer[])

    Create an IDrawer based on an other data container

    Declaration
    public static CoreEditorDrawer<TData>.IDrawer Select<T2Data>(CoreEditorDrawer<TData>.DataSelect<T2Data> dataSelect, params CoreEditorDrawer<T2Data>.IDrawer[] otherDrawers)
    Parameters
    Type Name Description
    CoreEditorDrawer.DataSelect<T2Data> dataSelect

    The data new source for the inner drawers

    CoreEditorDrawer.IDrawer<>[] otherDrawers

    Inner drawers drawed with given data sources

    Returns
    Type Description
    CoreEditorDrawer.IDrawer<>
    Type Parameters
    Name Description
    T2Data
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023