question

quaidtseng avatar image
quaidtseng asked

Whispersync is not working (but leaderboard / achievement is fine)

With Unity/Android, I have my gameClient.cs like this: void Start () { AGSClient.ServiceReadyEvent += serviceReadyHandler; AGSClient.ServiceNotReadyEvent += serviceNotReadyHandler; AGSWhispersyncClient.OnNewCloudDataEvent += OnNewCloudDataHandler; AGSClient.Init (true, true, true); m_scoreAccumulated = gameDataMap.GetLatestNumber("Total Score").AsInt(); } and somewhere in the game I save score like this: gameDataMap = AGSWhispersyncClient.GetGameData(); AGSSyncableNumber syncedTotalScore = gameDataMap.GetHighestNumber("Total Score"); syncedTotalScore.Set(m_scoreAccumulated); AGSWhispersyncClient.Synchronize(); My GameCircle definitely runs smoothly, with all leaderboard and achievements going well. However, m_scoreAccumulated is always 0 whenever I restart the game. It seems Whispersync is not working. And I never got OnNewCloudDataEvent () (and seems this one is the only event callback in AGSWhispersyncClient.cs, I can't find others )
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

quaidtseng avatar image
quaidtseng answered
Maybe the string name must match the variable name, so I changed it from m_scoreAccumulated = gameDataMap.GetHighestNumber("Total Score").AsInt(); ... AGSSyncableNumber syncedTotalScore = gameDataMap.GetHighestNumber("Total Score"); syncedTotalScore.Set(scoreAccumulated ); to m_scoreAccumulated = gameDataMap.GetHighestNumber("syncedTotalScore ").AsInt(); ... AGSSyncableNumber syncedTotalScore = gameDataMap.GetHighestNumber("syncedTotalScore "); syncedTotalScore.Set(scoreAccumulated ); But still it is not working :( Message was edited by: quaidtseng
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

quaidtseng avatar image
quaidtseng answered
I got it to work. This post can be deleted if possible. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hvsclark avatar image
hvsclark answered
Can you provide any tips on getting this working? I'm in a very similar situation - I've got login, achievements, and leaderboards working in my Unity Android game, but whispersync seems to be completely busted - I get no callbacks and data doesn't seem to sync as expected. I'd think it's something to do with my implementation, but even the AmazonGameCircleExample scene doesn't work correctly - when I choose sync, it just loads indefinitely with no callbacks. Any hints/tips would be greatly appreciated!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Hvsclark, Can you please check below component is added in your manifest? [b][/b]
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.