Class UIControlsService | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class UIControlsService

    Util class for UI controls.

    Inheritance
    System.Object
    UIControlsService
    Namespace: Unity.Tiny.UIControls
    Syntax
    public static class UIControlsService

    Methods

    AddOnClickCallback(ComponentSystem, Entity, EventCallback)

    Sets the callback that is called when the control is clicked.

    Declaration
    public static int AddOnClickCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    EventCallback callback
    Returns
    Type Description
    System.Int32

    AddOnDownCallback(ComponentSystem, Entity, EventCallback)

    Sets the callback that is called when the control is pressed.

    Declaration
    public static int AddOnDownCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    EventCallback callback
    Returns
    Type Description
    System.Int32

    AddOnEnterCallback(ComponentSystem, Entity, EventCallback)

    Sets the callback that is called when the mouse cursor enters the control's bounds.

    Declaration
    public static int AddOnEnterCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    EventCallback callback
    Returns
    Type Description
    System.Int32

    AddOnLeaveCallback(ComponentSystem, Entity, EventCallback)

    Sets the callback that is called when the mouse cursor leaves the control's bounds.

    Declaration
    public static int AddOnLeaveCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    EventCallback callback
    Returns
    Type Description
    System.Int32

    AddOnUpCallback(ComponentSystem, Entity, EventCallback)

    Sets the callback that is called when the control is released.

    Declaration
    public static int AddOnUpCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    EventCallback callback
    Returns
    Type Description
    System.Int32

    IsEnabled(ComponentSystem, Entity)

    Declaration
    public static bool IsEnabled(ComponentSystem sys, Entity uiControl)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    Returns
    Type Description
    System.Boolean

    RemoveCallback(ComponentSystem, Int32)

    Declaration
    public static void RemoveCallback(ComponentSystem sys, int callbackId)
    Parameters
    Type Name Description
    ComponentSystem sys
    System.Int32 callbackId

    SetEnabled(ComponentSystem, Entity, Boolean)

    Declaration
    public static void SetEnabled(ComponentSystem sys, Entity uiControl, bool enabled)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity uiControl
    System.Boolean enabled
    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