Overview
The State class can be used to store & fetch data in the user's phone
A State is a wrapper around the Persistence
module in Spark AR
States can hold any number, boolean, string, and/or Vector you want to store
Creating a State
To create a State, simply instance one, and provide a whitelisted Persistence module key
It's essential that the string provided corresponds to a whitelisted key. If it doesn't the State will throw an error
Updating data
To update the data in a State, use the setValue method
Last updated
Was this helpful?