Class UIElementsUtility | Anime Toolbox | 0.4.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class UIElementsUtility

    A utility class for performing operations related to UIElements.

    Inheritance
    Object
    UIElementsUtility
    Namespace: Unity.AnimeToolbox
    Syntax
    public static class UIElementsUtility

    Methods

    AddElement<T>(VisualElement, String)

    Add a VisualElement

    Declaration
    public static T AddElement<T>(VisualElement parent, string className = null)
        where T : VisualElement, new()
    Parameters
    Type Name Description
    VisualElement parent

    The parent that will contain the new VisualElement

    String className

    The class of the VisualElement. Will be ignored if set to null

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The newly created VisualElement

    AddField<F, V>(VisualElement, GUIContent, V)

    Add a UIElements field

    Declaration
    public static F AddField<F, V>(VisualElement parent, GUIContent content, V initialValue)
        where F : BaseField<V>, INotifyValueChanged<V>, new()
    Parameters
    Type Name Description
    VisualElement parent

    The parent that will contain the new field

    GUIContent content

    The tooltip and label of the field

    V initialValue

    The initial value of the field

    Returns
    Type Description
    F
    Type Parameters
    Name Description
    F

    The type of the field

    V

    The type of the field's value

    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