Rive Events
Listen to Rive Events in Bevy.
For more information on Rive Events see the respective runtime and editor documentation.
Rive Events
With Rive events, you have the ability to subscribe to meaningful signals that get reported from animations, state machines, and Rive listeners, all created at design time from the Rive editor.
Events
Events are a way to send signals to your runtime code to execute a block of code at the right moment.
Subscribing to Events
Imports needed:
The following code demonstrates a system listening to all Rive events reported from active state machines.
For example, let’s take a look at a code snippet for a star-rating Rive file. If a reported event’s name is star, the Number property is retrieved from the event data.
Other properties that can be read are Bool and String, with Property::Bool
and Property::String
.
Additional Resources
Was this page helpful?