The Unreal plugin is in alpha and may change.

Using the OnRiveReady Event

Accessing rive objects requires them to be initialized. This is due to the multithreaded nature of Rive’s underlying implementation. OnRiveReady events can be used to determine when Rive is ready for use.

For instance, you may want to set data in a Rive component when it is first created, like filling in the user’s name in a Text Run when a RiveWidget is created.

The blueprint below shows how to bind to the OnRiveReady event of a RiveWidget and set the text when play has begun and the RiveWidget is ready for use.

Translate mouse events to Rive artboard events

If you’re using a world space widget (e.g. a Widget component added to your actor), you can simply enable “Receive Hardware Input” on the component to have it respond to mouse events. The method below is only necessary if you’re using a Rive texture in worldspace.

If you’re using a Rive animation on a worldspace texture, you’ll need to manually pass mouse events to your Rive artboard. To do this:

  1. Enable “Support UV from hit results” in your Project Settings.

  2. Create a blueprint that translates mouse location to artboard hits. The Topography Map level in the Rive Unreal Demos repository has an example of a Macro that does this using line traces:

  3. Call the Macro for the corresponding events and pass them to the artboard:

Controlling Rive files in Unreal Sequencer

Rive files have both inputs and triggers that can be called via Blueprints, which in turn can be called by triggers in the Unreal Sequencer. The Rive and Unreal terminology collides a bit here, so I’ll try to be as clear as possible.

1

In sequencer, add your RiveActor as a track.

2

Move the timeline head to the location where you want to trigger an input or Rive trigger.

3

Add a key.

4

Right-click the key, select Properties and select “Create New Endpoint”. This will create a Blueprint node that will trigger whatever Blueprint action you like, including Rive actions.

5

Open the Blueprint (double-click on Event) and add a Rive Set Bool Value node (be sure to uncheck “Context Sensitive” in the search box.

6

The Rive Set Value nodes require an artboard as an input which can be derived from the Sequencer Event node. Add a Rive Get Artboard node and drag the target from the Sequencer Event node. A conversion node will be automatically added.

7

Ensure the Blueprint’s “Call In Editor” box is checked.

In the example video below, I have a Rive file that has a Boolean input called “Processing” which kicks off a looping animation.