I am passing an array from my SmartFoxServer extension to my Unity3d game but I am having a hard time parsing. Here is how I send it in my extension:
SFSObject resObj = new SFSObject();
ISFSArray myArray= new SFSArray();
myArray.addUtfString("some String");
myArray.addUtfString("another string");
myArray.addUtfString("more string");
resObj.putSFSArray("myArray", myArray);
send("mySentData", resObj, gameExt.getGameRoom().getUserList());
In my Unity3d C# code, I do the following:
ISFSArray myNewArray= dataObject.GetSFSArray("myArray");
But, I am not sure how to parse the array for each string. I've tried something like this:
for (int i = 0; i <= myNewArray.Size(); i++)
{
String w = cardsDealt[0];
}
But this gives an error; Any tips on how to do this:
thanks