void Start() { // Open your datasets playerInfo = SyncManager.OpenOrCreateDataset("PlayerInfo"); // Fetch locally stored data from a previous run alias = string.IsNullOrEmpty(playerInfo.Get("alias")) ? "Enter your alias" : playerInfo.Get("alias"); playerName = string.IsNullOrEmpty(playerInfo.Get("playerName")) ? "Enter your full name" : playerInfo.Get("playerName"); // Define Synchronize callbacks // when ds.Synchronize() is called the localDataset is merged with the remoteDataset // OnDatasetDeleted, OnDatasetMerged, OnDatasetSuccess, the corresponding callback is fired. // The developer has the freedom of handling these events needed for the Dataset playerInfo.OnSyncSuccess += this.HandleSyncSuccess; // OnSyncSucess uses events/delegates pattern playerInfo.OnSyncFailure += this.HandleSyncFailure; // OnSyncFailure uses events/delegates pattern playerInfo.OnSyncConflict = this.HandleSyncConflict; playerInfo.OnDatasetMerged = this.HandleDatasetMerged; playerInfo.OnDatasetDeleted = this.HandleDatasetDeleted; }