docs.unity3d.com
    Show / Hide Table of Contents

    Class ElementAdderMeta

    Provides meta information which is useful when creating new implementations of the IElementAdderMenuBuilder<TContext> interface.

    Inheritance
    Object
    ElementAdderMeta
    Namespace: Unity.VisualScripting.ReorderableList.Element_Adder_Menu
    Syntax
    public static class ElementAdderMeta

    Methods

    GetConcreteElementTypes(Type)

    Gets an array of all the concrete element types that implement the specified contractType.

    Declaration
    public static Type[] GetConcreteElementTypes(Type contractType)
    Parameters
    Type Name Description
    Type contractType

    Contract type of addable elements.

    Returns
    Type Description
    Type[]

    An array of zero or more concrete element types.

    Exceptions
    Type Condition
    ArgumentNullException

    If contractType is null.

    See Also
    GetConcreteElementTypes(Type, Func<Type, Boolean>[])

    GetConcreteElementTypes(Type, Func<Type, Boolean>[])

    Gets a filtered array of the concrete element types that implement the specified contractType.

    Declaration
    public static Type[] GetConcreteElementTypes(Type contractType, Func<Type, bool>[] filters)
    Parameters
    Type Name Description
    Type contractType

    Contract type of addable elements.

    Func<Type, Boolean>[] filters

    An array of zero or more filters.

    Returns
    Type Description
    Type[]

    An array of zero or more concrete element types.

    Remarks

    A type is excluded from the resulting array when one or more of the specified filters returns a value of false.

    Exceptions
    Type Condition
    ArgumentNullException

    If contractType is null.

    See Also
    GetConcreteElementTypes(Type)

    GetMenuCommands<TContext>(Type)

    Gets an array of IElementAdderMenuCommand<TContext> instances that are associated with the specified contractType.

    Declaration
    public static IElementAdderMenuCommand<TContext>[] GetMenuCommands<TContext>(Type contractType)
    Parameters
    Type Name Description
    Type contractType

    Contract type of addable elements.

    Returns
    Type Description
    IElementAdderMenuCommand<TContext>[]

    An array containing zero or more IElementAdderMenuCommand<TContext> instances.

    Type Parameters
    Name Description
    TContext

    Type of the context object that elements can be added to.

    Exceptions
    Type Condition
    ArgumentNullException

    If contractType is null.

    See Also
    GetMenuCommandTypes<TContext>(Type)

    GetMenuCommandTypes<TContext>(Type)

    Gets an array of the IElementAdderMenuCommand<TContext> types that are associated with the specified contractType.

    Declaration
    public static Type[] GetMenuCommandTypes<TContext>(Type contractType)
    Parameters
    Type Name Description
    Type contractType

    Contract type of addable elements.

    Returns
    Type Description
    Type[]

    An array containing zero or more Type.

    Type Parameters
    Name Description
    TContext

    Type of the context object that elements can be added to.

    Exceptions
    Type Condition
    ArgumentNullException

    If contractType is null.

    See Also
    GetMenuCommands<TContext>(Type)
    Back to top
    Terms of use
    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