Hi
i need to Access User Data ( coins , etc) to display them in ugui .
Thanks
ok now i can Access User Data but i can't modify them
if (CBManager.instance.isAuthenticated)
{
user = CBManager.instance.loggedUser;
MyUser myUser = user as MyUser;
myUser.Coins -= 10;
CBManager.instance.loggedUser.Update();
}
the error :
InvalidCastException: Cannot cast from source type to destination type.
NullReferenceException: Object reference not set to an instance of an object
May be you forgot to use the correct override of Login? If you take a look at the demo scene, it calls:
CBManager.instance.Login<MyUser>(loginUsername, loginPassword);
If you don't use this override of Login, then the default one is creating loggedUser with the basic class CBUser so you will not be able to cast it to your MyUser class.
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks for support , now i can Access user data very smooth , Combu is great solution for my project ( five star not enough).
Great you succeeded!
Have fun!
FRANCESCO CROCETTI @ SKARED CREATIONS