Struct Button | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Button

    Component for UI buttons.

    Namespace: Unity.Tiny.UIControls
    Syntax
    public struct Button : IComponentData

    Fields

    sprite2DRenderer

    Reference to an entity with a Sprite2DRenderer component that represents the button's default state. Mouse/touch interaction, captured by the PointerInteraction component, swaps or modifies the sprite based on the type of transition you apply. If this is set to NONE, it assumes that the underlying entity (the one that the Button component is attached to) also has a Sprite2DRenderer component, and uses that.

    Declaration
    public Entity sprite2DRenderer
    Field Value
    Type Description
    Entity

    transition

    Reference to an entity that defines visual transitions based on mouse/ touch interaction captured by the PointerInteraction component. For example, A SpriteTransition or ColorTintTransition component.

    Declaration
    public Entity transition
    Field Value
    Type Description
    Entity
    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