Overview
To select a state machine, double-click the RiveTextureObject asset and enter a state machine name. Leaving the name blank will use the default state machine.
A Rive file may contain many artboards, and an artboard may contain many state
machines.
Setting Inputs
A Rive state machine can have the following input types:- a boolean that can be set to true or false.
- a number that can be set to any value.
- a trigger that is a boolean set to true for one frame.

effectsVolume
is a number, continueAvailable
is a boolean, and back
is a trigger.
An Input is accessed by its string name from an Artboard (retrieved
from a RiveFile).
Boolean Input
To update a boolean value callSet Bool Value
on the artboard.
In the example below, we’re setting the boolean input, named isOpen
, equal to a local variable Is Open
.

Get Bool Value
on the artboard, and get the return value.

Number Input
To update a number value callSet Number Value
on the artboard.
In the example below, we’re setting the number input, named health
, equal to a local variable Health
.

Get Number Value
on the artboard, and get the return value.

Trigger Input
To fire a trigger, callFire Trigger
on the artboard.
In the example below, we’re firing the trigger named openMenu
.

Nested Inputs
You can call these functions on nested inputs by using the node equivalents that end in “at Path”. See the Components documentation for more details on using components.
Example
Let’s take a look at an example. The video below shows a Rive file with a simple state machine containing one number input, namednumExpression
.
This number input switches out the active playing animation, and the state machine blends between the different animations as they transition.
From a runtime we can set the numExpression
through Blueprint to toggle the correct expression for the Robot.
In this example, the number input is set when the corresponding number key is pressed:
