i created a database using h2 database,i used the h2 database console to create a simple database with a table like this:
id name
0 amy
1 jack
2 bob
also i copied ths internaldb.as extension and modified a little for the my own database!
in unity3d,i just use the sfsisland demo for testing, some test functions:
Code: Select all
....
if(Input.GetKeyDown(KeyCode.LeftControl))
{
Hashtable h=new Hashtable();
smartFoxClient.SendXtMessage("myDataBase", "getList",h,SmartFoxClient.XTMSG_TYPE_XML);
}
...
i can see the "GetResponse" in unity3d console,and here comes the question:
how should i get the right data returnen from server in the delegate?
i tried convert the data to sfsobject but didn't work...
what should i do if i want to get more data from a bigger database??
public void OnExtensionResponse(object data, string type)
{
print("GetResponse!!!");
how to convert the data to a hashtable like object?????
.....
}
thanks for hints!!