Your next feature
Cloud Save
Save game progress and load it on the next launch.
Unity

Your visible result
Saved progress loads again after restarting the game.
Inspect a cloud save1:56
Open video separately ↗Build this feature
You can preview the guide. Running it requires an active project key. Prepare project
SDK installed, project configuration imported and player signed in.
C#
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4
5// Define your save structure
6[System.Serializable]
7public class GameData
8{
9 public int Level;
10 public int Coins;
11}
12
13// Attach this script to a GameObject in your first scene.
14public class CloudSaveDemo : MonoBehaviour
15{
16 async void Start()
17 {
18 // Setup: initialize, connect and sign in a player.
19 HorizonApp.Initialize();
20 await new HorizonServer().Connect();
21 await UserManager.Instance.SignUpAnonymous("PlayerName");
22
23 // horizOn: save the player data and load it again.
24 // Save
25 var data = new GameData { Level = 5, Coins = 1000 };
26 await CloudSaveManager.Instance.SaveObject(data);
27
28 // Load
29 var loaded = await CloudSaveManager.Instance.LoadObject<GameData>();
30 }
31}
Test your new feature.
Saved progress loads again after restarting the game.
Choose the same project in the dashboard as in your game configuration.
Docs and dashboard
Read the docsTutorial video
Cloud SaveUnity3:38
Open video separately ↗
