- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
 
- 纳金币
- -1
- 精华
- 11
|
测试前需要先搭建本机测试环境 下面是英文简介:
This library can be used to exchange data between Unity and php or to load / save binary data to a local file (the position players, etc.) Below you will find a server files, dll and example project.
Put the library in the "Your Project / Assets / Plugins /», server files - to the server, set the path to the gateway:
Code:
Gateway.Init(serverURL, gatewayPath, gatewayName);
Gateway.SESSIONID = "DEBUG";//You can get this from JavaScript
Gateway.GetSender().Call(myo, "ServerToClient", "hashtable", OnGetAnswer);
/*full code attach.*/
/*or for save local*/
void Serialize()
{
UNpserializer unp = new UNPSerializer();
byte[] ba = unp.Encode(myo);
}
And we get the data in the C# format, in callback function.
Now supported by the serialization / deserialization:
NULL
BOOLEAN
STRING
INTEGER
FLOAT
ARRAY
ARRAYLIST
HASHTABLE
DICTIONARY
LIST
VECTOR2
VECTOR3
VECTOR4
COLOR
QUATERNION
MESH
TEXTURE2D (from PNG)
Not support your classes - later it will be included.
For download the Mesh, you must first save the serialized Mesh - you can use the top menu editor "SaveMesh"
I welcome your feedback.
DEMO
unp.zip (759.3 KB, 7 views)
unp_server.zip (184.8 KB, 6 views)
UNP_dll.zip (93.4 KB, 8 views)
来自互联网
|
|