Sorry for noobie q...
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
Converting Raw to Array in Unity API?
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
From the documentation of OnExtensionResponse - direct cut'n'paste:
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
}
}
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Return to “.Net / Unity3D API”
Who is online
Users browsing this forum: No registered users and 24 guests