Reading and modifying text at runtime (legacy)
.getTextRunValue()
API on the Rive instance:undefined
if the text run could not be queried.Setting TextTo set a given text run value at any given time, reference the .setTextRunValue()
API on the Rive instance:textValue
, with a String value that you want to set the new text value for if the text run can be successfully queried on the active artboard.Artboard
, find a text run by a given name, and get/update the text value property.ArtboardWithUniqueName/ButtonWithUniqueName
.getTextRunValueAtPath()
API on the Rive instance:undefined
if the text run could not be queried.Setting TextTo set a given text run value at a specific path, reference the .setTextRunValueAtPath()
API on the Rive instance:textRunName
, the new textValue
, and the path
where the run is located at a nested artboard level.