Multi-Device Progress Sync
Load saved data when app starts and listen for changes from other devices.
Actions Required
CloudServicesOnSavedDataChange
Listen for remote updates
CloudServicesGetChangedKeyInfo
Read key name by index (optional)
Variables Needed
changedKeys (Array: String) - PlayMaker Array (set element type to String)
changeReason (Enum: CloudSavedDataChangeReasonCode)
Implementation Steps
1. State: LoadProgress (On App Start)
Action: CloudServicesGetValue
Repeat for each key you want to load.
2. State: ListenForChanges
Action: CloudServicesOnSavedDataChange
Outputs:
changedKeys β changedKeys array
changeReason β changeReason
Events:
dataChangedEvent β HandleRemoteChange
3. State: HandleRemoteChange
Loop keyIndex = 0..changedKeys.Length-1 and for each key:
(Optional) CloudServicesGetChangedKeyInfo(keyIndex) β keyName
If you need conflict handling, call CloudServicesGetCloudAndLocalCacheValues(keyName) to get both values:
decide your policy (cloud wins / local wins / max wins / prompt user)
Otherwise, just reload from cloud:
If keyName == "player_level" β CloudServicesGetValue("player_level", valueType:Int) and update playerLevel
If keyName == "total_score" β CloudServicesGetValue("total_score", valueType:Int) and update totalScore
If you donβt want a loop, you can also directly use PlayMaker Array actions (Array Get / Array Contains) on changedKeys.
Conflict Resolution Strategies
Last Write Wins: Use remote value always Highest Wins: Compare local vs remote, keep higher value Manual Merge: Prompt user to choose
Last updated