Component:ButtonActionTrigger: Difference between revisions

From Resonite Wiki
fixed link to impulses
Automated: update component fields
Line 12: Line 12:
== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|OnPressed|Action| Triggered when the button is pressed
|OnPressed|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv0=true| Triggered when the button is pressed
|OnPressing|Action| Triggered when the button is pressed, before the <code>OnPressed</code> event
|OnPressing|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv1=true| Triggered when the button is pressed, before the <code>OnPressed</code> event
|OnReleased|Action| Triggered when the button is released
|OnReleased|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv2=true| Triggered when the button is released
}}
}}
== Behavior ==
== Behavior ==

Revision as of 10:39, 1 March 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
ButtonActionTrigger component as seen in the Scene Inspector

Intoduction

The ButtonActionTrigger component is used for triggering C# actions (not to be confused with impulses) using UIX Buttons or Legacy Buttons.

It must be a child of the same slot as a button in order to be bound to it.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
OnPressed Action Triggered when the button is pressed
OnPressing Action Triggered when the button is pressed, before the OnPressed event
OnReleased Action Triggered when the button is released

Behavior

This component allows you to trigger actions on some special components, such as the Random Object Spawner component, by dragging the reference to the target action into a trigger slot (such as OnPressed)

Examples

Related Components