Hi Thomas.
I'm using your API with Unity and Smartfox server.
I need to set a variable inside a room, I've created them in the config.xml and I can see them thru the administration. I can read them from the clients by Unity, but I cannot write inside them using SetRoomVariables because I get a compiling error.
During the compiling process the error log says:
SmartFoxClientAPI.SmartFoxClient does not contain definition for SetRoomVariables().
To modify this variables from the clients, is this the correct method or there is another way?
NB: this variables must contain the latest values also when the other users log out from the game.
Example: If a player modify the position of an object, that object must mantain its position when the user logs off so when another user logs in it must see the object in the last position of the previous one.
thanks
Ringhino
[Unity API] Problem with SetRoomVariables();
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Hi!
You should be able to set the variables with
public void SetRoomVariables(ArrayList varList)
public void SetRoomVariables(ArrayList varList, int roomId)
or
public void SetRoomVariables(ArrayList varList, int roomId, bool setOwnership)
I see that the documentation writes setRoomVariables instead of SetRoomVariables. It also has the wrong syntax - seems I simply forgot to translate that part into C#. Thats a bug in the documentation, and I'll fix that in the next release.
The ArrayList containts RoomVariable objects btw.
You should be able to set the variables with
public void SetRoomVariables(ArrayList varList)
public void SetRoomVariables(ArrayList varList, int roomId)
or
public void SetRoomVariables(ArrayList varList, int roomId, bool setOwnership)
I see that the documentation writes setRoomVariables instead of SetRoomVariables. It also has the wrong syntax - seems I simply forgot to translate that part into C#. Thats a bug in the documentation, and I'll fix that in the next release.
The ArrayList containts RoomVariable objects btw.
Return to “.Net / Unity3D API”
Who is online
Users browsing this forum: No registered users and 67 guests