Text
Read and update Rive Text
This article is out of date! Find the new version here.
For more information on Rive Text see the respective runtime and editor documentation.
Read/Update Text Runs at Runtime
A unique run name must be set in the editor for it to be easily discoverable at runtime. See the runtime docs for more information.
Imports needed:
The following code retrieves the active Artboard
from a state machine and finds the TextValueRun
component by name.
Note that finding the component by name can be an expensive operation if the artboard has many components.
If the text run needs to be accessed frequently you can store the index value and access it directly.
For example:
Then store text_run_index
and later access the component by index directly:
Additional Resources
Last updated