I dont know how to load usergroups it appears.
I can add customData but getting it from the server doesnt seem to work so I believe I'm not loading groups properly. This is what I'm using directly out of the documentation:
12.2 Load groups
To load groups you have 3 choices:
• load groups owned by local user UserGroup.Load(CombuManager.localUser.idLong, (UserGroup[] groups, string error) => { Debug.Log(groups.Length); });
• load groups in which local user is a member (owners are also members) UserGroup.LoadMembership(CombuManager.localUser.idLong, (UserGroup[] groups, string error) => { Debug.Log(groups.Length); });
It does nothing.. Even the Debug.Log(groups.Length) returns 0.....
I don't know how you're creating groups, but the following code is running fine:
CombuManager.platform.Authenticate("username", "password", (bool logged, string errorLogin) => {
if (logged)
{
UserGroup group = new UserGroup ();
group.name = "My Group";
group.users = new User[] { {userName=CombuManager.localUser.userName} };
group.Save((bool success, string error) => {
Debug.Log("Group saved: " + success);
if (success)
{
UserGroup.Load(CombuManager.localUser.userName, (UserGroup[] groups, string errorLoad) => {
Debug.Log("Groups: " + groups.Length);
});
}
});
}
});
FRANCESCO CROCETTI @ SKARED CREATIONS