Storage
Data kept on the device between sessions, and cloud storage shared across users or locations.
Commonly used
PersistentStorageSystemAllows data to be stored and retrieved between Lens sessions.CloudStorageModuleProvides access to Cloud Storage capabilities.GeneralDataStoreClass for storing and retrieving data based on keys.
Guides
Persistent Cloud StoragePersistent Cloud Storage allows you to store data in the cloud, such that it can persist across account logins, as well as be shared in a multiplayer session.Single Player ExamplePersistent Cloud Storage is a great way to build a Lens that you want a user to come back with over, and over again.Multiplayer ExamplePersistent Cloud Storage can be shared in a multiplayer session by passing in the MultiplayerSession provided by the ConnectedLensModule to allow multiple participants to access…Persistent StorageBy default, script variables retain their value only while the Lens is active.Sharing Data Between ParticipantsLens Studio provides several APIs to enable users to pass data between participants in a multiplayer Lens session (that is, Connected Lens).Token ManagementManage OAuth2 tokens in SPECS Lenses with Auth Kit: persistent storage, automatic refresh, expiration, and the OIDC ID token.
All APIs in this topic
Reference assets and other modules with a script input.
Components, assets, and modules
| API | Description |
|---|---|
| CloudStorageModule | Provides access to Cloud Storage capabilities. |
| LocationCloudStorageModule | Provides access to location cloud storage depending upon the LocationCloudStorageOptions. |
Objects and data
| API | Description |
|---|---|
| CloudStorageListOptions | Options associated with the listValues method call. |
| CloudStorageOptions | Used to configure Cloud Storage Module with various options. |
| CloudStorageReadOptions | Options associated with the getValue/deleteValue methods for Cloud Storage. |
| CloudStorageWriteOptions | Options associated with the setValue method for Cloud Storage. |
| CloudStore | An instance of Cloud Storage that can store data in a multiplayer experience. |
| DataStoreWithScene | A GeneralDataStore that persists data across multiple Snaps within the same Lens session. |
| GeneralDataStore | Class for storing and retrieving data based on keys. |
| LocationCloudStorageOptions | Used to configure LocationCloudStorage module with various options. |
| LocationCloudStore | Instance of location cloud store which has a similar interface as cloud store. |
| PersistentStorageSystem | Allows data to be stored and retrieved between Lens sessions. |
Enums
| API | Description |
|---|---|
| StorageScope | Specifies a scope for storing or retrieving values from a MultiplayerSession. |