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 |