Component:HoverPlayback: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
Automated: update Fields
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Hover Playback
|Name=Hover Playback
}}
}}
{{stub}}
The '''HoverPlayback''' component plays or stops a Playable when on the root of a hiearchy that has colliders and is touched/pressed.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Target|SyncPlayback|
|Target|SyncPlayback| The Playback (timeline/animation) to influence.
|Trigger|'''[[#PlayTrigger|PlayTrigger]]'''|TypeAdv1=true|
|Trigger|'''[[#PlayTrigger|HoverPlayback.PlayTrigger]]'''|TypeAdv1=true| what should trigger the playback.
|FromBeginning|Bool|
|FromBeginning|Bool| Whether to play from the beginning or not.
|Loop|Bool|
|Loop|Bool| Whether to loop the playback.
}}
 
== PlayTrigger ==
{{Table EnumValues
|Hover|0| play/pause the audio when the user hovers their laser over the collider this component is on.
|Touch|1| play/pause the audio when the user presses primary over the collider this component is on.
}}
}}


== Behavior ==
== Usage ==
Attach to a slot or slot hiearchy with colliders, and provide a <code>Target</code>.


== Examples ==
== Examples ==
Can be used for the play button on a casset player


== See Also ==
== See Also ==
Line 22: Line 30:
[[Category:Components{{#translation:}}|Hover Playback]]
[[Category:Components{{#translation:}}|Hover Playback]]
[[Category:Components With Nested Enums{{#translation:}}|Hover Playback]]
[[Category:Components With Nested Enums{{#translation:}}|Hover Playback]]
[[Category:ComponentStubs]]

Latest revision as of 06:02, 17 March 2025

Component image 
Hover Playback component as seen in the Scene Inspector

The HoverPlayback component plays or stops a Playable when on the root of a hiearchy that has colliders and is touched/pressed.

Fields

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. Some components stop their functionality when this field is disabled, but some don't.
Target SyncPlayback The Playback (timeline/animation) to influence.
Trigger HoverPlayback.PlayTrigger what should trigger the playback.
FromBeginning Bool Whether to play from the beginning or not.
Loop Bool Whether to loop the playback.

PlayTrigger

Values
Name Value Description
Hover 0 play/pause the audio when the user hovers their laser over the collider this component is on.
Touch 1 play/pause the audio when the user presses primary over the collider this component is on.

Usage

Attach to a slot or slot hiearchy with colliders, and provide a Target.

Examples

Can be used for the play button on a casset player

See Also