Exporting for Runtime
To export a file for runtime, select the blue export action on the right-hand side of the toolbar or navigate to Export
> For runtime
via the left-hand toolbar menu. You can load the exported .riv
file into your app, game, or website via any of our open source runtimes.
As of June 2024 we've made changes to the way object names are exported.
Changes to exporting object names
You may need to access certain objects at runtime, such as a text run to swap a string, or a nested artboard to access its inputs. In order to make these objects discoverable at runtime, you'll need to explicitly set it's name to be exported.
Previously, names would be exported if renamed from their default value in the editor. The issue with this approach was it assumed any renamed object was being sought at runtime, when in many cases you may simply want to rename objects to better organise your file — you didn't necessarily need them to be exported into your .riv
export. Subsequently, we've changed this approach to provide more finite control over what object names get exported.
To export a name, right-click on it in the hierarchy or on the stage and toggle the 'Export name' option.
Objects with names set to be exported can be identified by the brackets wrapping their name.
Animations, State Machines, Events, and Input names do not require manual export.
Benefits of optimizing your names
Exporting an object's name into your .riv
adds a small amount of data. For large, complex files, the name data can start to add up. For that reason, it's desirable to only export the names you need to reference at runtime.
Files created before the introduction of explicit export
For files created before this toggle was implemented, we assume any renamed object needs to be discoverable at runtime. That means you may notice a lot of items in your hierarchy being displayed inside brackets when opening an existing file. If, however, you'd prefer to not export the names and make your export size smaller, you can take these steps:
From the toolbar menu, select
Export options
>Remove name exports
.Individually re-enable name exports for objects you need to access at runtime by right-clicking them in the hierarchy or on the stage and selecting
Export name
.