Install com.unity.services.cloudsave and com.unity.services.economy via Package Manager; initialize Unity Services and authenticate the player before calling either API.
Save player data by calling CloudSaveService.Instance.Data.Player.SaveAsync with a dictionary of string keys and serializable value objects; keys are scoped per player.
Load data with CloudSaveService.Instance.Data.Player.LoadAsync, specifying a set of keys or using LoadAllAsync; deserialize the returned SaveItem values into your game model.
In the Economy dashboard, define currencies (virtual currency with an initial balance) and inventory items; publish the configuration before the SDK can reference them.
Grant or deduct currency using EconomyService.Instance.PlayerBalances.IncrementBalanceAsync or DecrementBalanceAsync with the currency ID and amount.
Purchase items defined in Economy using EconomyService.Instance.Purchases.MakeVirtualPurchaseAsync to atomically deduct cost currency and grant item inventory in one server-validated call.
Known gotchas
Cloud Save keys are case-sensitive and limited in length; standardize a naming convention (e.g., snake_case) to avoid hard-to-diagnose mismatches.
Economy virtual purchases are validated server-side; the client cannot grant items directly — all purchases must go through a defined purchase configuration.
Cloud Save does not support partial updates to nested objects; you must read, modify locally, and write back the entire value for any key that stores a complex object.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp