I have this code to subscribe:
Code: Select all
smartFoxClient.AddEventListener(SFSEvent.USER_VARIABLES_UPDATE, OnUserVarsUpdate);
then this to set some values:
Code: Select all
List<UserVariable> userVars = new List<UserVariable>();
userVars.Add( new SFSUserVariable("avatarType", "SwedishCook") );
userVars.Add( new SFSUserVariable("country", "Sweden") );
smartFoxClient.Send ( new SetUserVariablesRequest(userVars) );
and at last this to receive them:
Code: Select all
private void OnUserVarsUpdate(BaseEvent evt)
{
List<UserVariable> changedVars = (List<UserVariable>)evt.Params["changedVars"];
User user = (User)evt.Params["user"];
Debug.Log("Received");
}
Unfortunately I don't see debug log in the console, so it seems that they are not received. Can you tell me what I'm doing wrong? Or maybe I have to configure something on the server.