Hi again!
Everything is working fine, and now I'd like to do the following:
- Reading the maxScore from the database.
- Check maxScore with the currentScore.
- if currentScore > maxScore -> maxScore = currentScore.
But I can't read the data from the database.
If I try to access it with the following:
CBManager.instance.loggedUser.customData["maxScore"]
It gives me back "Null".
Am I using the right method?
Account customData is something that you save, there's no default customData for accounts. I don't know what you're using maxScore for, but if you want to use it then you should set it first (for example adding it when you first create an account in Unity) or use a wrapper class like MyUser in the demo scene.
FRANCESCO CROCETTI @ SKARED CREATIONS
Sorry...
You were right. I created the customData in the MyUser class, but I forgot to add the element "maxScore" in the creation of the new user.
I've added it and now it works correctly.
Thank you!