Docs
/Docs
Ctrl K
GitHubDashboard
IntroductionQuick StartInstallationConfigurationSelf-Hosting Guide
Unity SDK(soon)
Unreal SDK(soon)
Godot SDK(soon)
Web SDK
Mobile SDKs(soon)
Authentication(soon)
Player DataCloud Save
Leaderboards(soon)
Economy
Analytics(soon)
Remote Config
Push Notifications(soon)
Friends and Social(soon)
AB Testing(soon)
Player Segments(soon)
REST API
Authentication(soon)
Error CodesRate Limits
Webhooks(soon)
Migrating from Other Services(soon)
Best Practices(soon)
Security(soon)
Testing(soon)

Need help?

Join our Discord community for support and updates.

Join Discord
Docs/Services/Player Data

Player Data

Persistent key-value storage for player progression. Store inventory, stats, game state, and user preferences securely in the cloud.

Key-Value Storage

Store any serializable data (numbers, strings, booleans, JSON objects) mapped to a key.

Access Control

Control who can read and write data with Public, Protected, and Read-Only permissions.

Atomic Operations

Modify counters safely without race conditions using Increment and Decrement operations.

Collections

Group related data into collections for easier organization and batch retrieval.

Code Examples

1using Ondara;
2using UnityEngine;
3
4public class PlayerDataExample : MonoBehaviour
5{
6 public async void SaveLoadExample()
7 {
8 // Save data
9 await Ondara.PlayerData.Set("level", 10);
10 await Ondara.PlayerData.Set("player_name", "Hero");
11 await Ondara.PlayerData.Set("inventory", new string[] { "sword", "shield" });
12
13 // Load data
14 int level = await Ondara.PlayerData.Get<int>("level");
15 string name = await Ondara.PlayerData.Get<string>("player_name");
16
17 Debug.Log($"Level: {level}, Name: {name}");
18 }
19}

Supported Data Types

Primitives

int, float, bool, string

Collections

List&lt;T&gt;, Dictionary&lt;K,V&gt;

Custom Objects

Any serializable C# class

JSON

Raw JSON strings

Best Practices

Batch Your Saves

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.

Use Atomic Ops for Economy

Always use Increment and Decrement for currency or numeric stats to prevent race conditions when multiple updates happen rapidly.

AuthenticationCloud Save