Rive Events
Access Rive Events in Unity
This article is out of date! Find the new version here.
For more information on Rive Events see the respective runtime and editor documentation.
Accessing Events
The following code demonstrates accessing all Rive events reported from an active state machine.
The method ReportedEvents()
returns a list of ReportedEvent
s.
Let's look at a code snippet for a star-rating Rive file. If a reported event's name is Star, the rating property of type float
and a message of type string
are retrieved from the event data (custom properties).
Properties that can be read are bool, string, and float.
Access a dictionary of all properties with:
reportedEvent.Properties
.
Additional Resources
For a complete example see the getting-started project in the examples repository and open the EventsScene scene.
Last updated