Class RepeatButton
A button that executes an action repeatedly while it is pressed.
Inheritance
RepeatButton
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class RepeatButton : TextElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, ITextElement, INotifyValueChanged<string>
Constructors
RepeatButton()
Constructor.
Declaration
public RepeatButton()
RepeatButton(System.Action, Int64, Int64)
Constructor.
Declaration
public RepeatButton(System.Action clickEvent, long delay, long interval)
Parameters
Type | Name | Description |
---|---|---|
System.Action | clickEvent | The action to execute when the button is pressed. |
Int64 | delay | The initial delay before the action is executed for the first time. |
Int64 | interval | The interval between each execution of the action. |
Fields
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Methods
SetAction(System.Action, Int64, Int64)
Set the action that should be executed when the button is pressed.
Declaration
public void SetAction(System.Action clickEvent, long delay, long interval)
Parameters
Type | Name | Description |
---|---|---|
System.Action | clickEvent | The action to execute. |
Int64 | delay | The initial delay before the action is executed for the first time. |
Int64 | interval | The interval between each execution of the action. |