Persistent key-value storage for player progression. Store inventory, stats, game state, and user preferences securely in the cloud.
Store any serializable data (numbers, strings, booleans, JSON objects) mapped to a key.
Control who can read and write data with Public, Protected, and Read-Only permissions.
Modify counters safely without race conditions using Increment and Decrement operations.
Group related data into collections for easier organization and batch retrieval.
12345678910111213141516171819using Ondara;using UnityEngine;
public class PlayerDataExample : MonoBehaviour{ public async void SaveLoadExample() { // Save data await Ondara.PlayerData.Set("level", 10); await Ondara.PlayerData.Set("player_name", "Hero"); await Ondara.PlayerData.Set("inventory", new string[] { "sword", "shield" });
// Load data int level = await Ondara.PlayerData.Get<int>("level"); string name = await Ondara.PlayerData.Get<string>("player_name"); Debug.Log($"Level: {level}, Name: {name}"); }}int, float, bool, string
List<T>, Dictionary<K,V>
Store and manage player data with Ondara.
Raw JSON strings
Instead of making 10 separate calls to save 10 items, create a single container class and save it all at once to reduce network requests.
Always use Increment and Decrement for currency or numeric stats to prevent race conditions when multiple updates happen rapidly.