Just wondering about how to convert Raw Data into Array with Unity API.
Seem like data type i got from OnExtensionResponse is an SFS object even if it's just a string.
Can't do (Array) resObj to convert it either. I'm so confused
Code: Select all
SFSEvent.onExtensionResponse += OnExtensionResponse;
public void OnExtensionResponse(object data, string type)
{
// Handle XML responses
if (type == SmartFoxClient.XTMSG_TYPE_XML)
{
SFSObject responseData = (SFSObject)data;
// TODO: check command and perform required actions
}
// Handle RAW responses
else if (type == SmartFoxClient.XTMSG_TYPE_STR)
{
string responseData = (string)data;
// TODO: check command and perform required actions
}
// Handle JSON responses
else if (type == SmartFoxClient.XTMSG_TYPE_JSON)
{
JsonData responseData = (JsonData)data;
// TODO: check command and perform required actions
}
}