Storage (Unity)
FRVRSDK.Data is the Unity wrapper’s storage surface. The same namespace exposes two flavours:
- Local storage (per device) —
SetItem,GetItem,RemoveItem,RemoveItems, plus batch helpersSetItems/GetItemsand whole‑blob helpersSetLocalJson/GetLocalJson. - Cloud storage (follows the player across devices) —
SetCloudItem,GetCloudItem,RemoveCloudItem,RemoveCloudItems. No batch or JSON‑blob equivalents on the cloud side.
All methods are callback‑based. Under the hood values are stored as strings (the C# signature is object and .ToString() is called for you), and Get callbacks deliver object — cast to string to use. Serialize complex objects with JsonUtility.ToJson(…) before storing.
In the Editor, local and cloud storage persist to <Project>/Library/FRVRSim/local.json and cloud.json — survives playmode restarts and lives outside Assets/ so it isn’t imported.
Local (per device)
Section titled “Local (per device)”Batch reads / writes (local only):
Use local storage for:
- Preferences (“muted”, “preferred_hand”)
- Caches the player can afford to lose (temp run state, asset caches)
- Device‑specific settings
Cloud (cross‑device)
Section titled “Cloud (cross‑device)”Use cloud storage for anything the player will notice losing: save game, unlocks, IAP‑granted content.
Treat a missing cloud read as “unknown”, not “new user”
Section titled “Treat a missing cloud read as “unknown”, not “new user””Related
Section titled “Related”- Storage concepts, batch shapes, public data queries: Web SDK cloud storage.