Unreal Rive Events

Rive Events

Access Rive Events in Unreal.

For more information on Rive Events see the respective runtime and editor documentation.

Overview

Rive Events provides a way to communicate information from the graphic to your runtime code, such as a button press. An event can contain any number of the following properties: booleannumber, or string.

Accessing Events

To access a Rive event, bind the Event Name to a Custom Event from the Artboard. In this example, the CustomRiveEvent will fire each time an event named Rating is reported.

An Event is accessed by its string name from an Artboard (retrieved from a RiveFile).

The function Print to Texts takes the Rive Event and loops over all of the event's properties.

Example

Let's take a look at an example. The video below demonstrates a Rive file using the "Star Rating" example. This example reports an event each time one of the stars are pressed. The event is named Rating and contains a number property named value that matches the pressed star.

In Blueprint, we:

  1. Bind Named Rive Event: Rating

  2. Break the RiveEvent, and loop over the number properties

  3. Break each RiveEventNumberProperty

  4. Find the number property named value

  5. Print the value of the number property