i tried creating a Room in Unity with this Code
Code: Select all
RoomSettings settings = new RoomSettings ( NAME );
settings.GroupId = "table";
settings.IsGame = true;
settings.MaxUsers = 999;
settings.MaxSpectators = 0;
settings.MaxVariables = (short)(20);
List<RoomVariable> variables = new List<RoomVariable> ();
variables.Add (new SFSRoomVariable("p1", p1 )) ;
variables.Add ( new SFSRoomVariable("p2", p2 )) ;
And Getting its value by calling
Code: Select all
List<Room> roomList = sfs.GetRoomListFromGroup ( "table" );
for(int i = 0; i < rooms.Count; i++) {
string p1= rooms[i].GetVariable ( "p1" ).GetStringValue();
string p2= rooms[i].GetVariable ( "p2" ).GetStringValue ();
}
on my server java code i am modifying the value of p1and p2 by
Code: Select all
getParentRoom().setVariable(new SFSRoomVariable( "p1",newP1));
getParentRoom().setVariable(new SFSRoomVariable( "p2",newP2));
i also set my RoomVariables to GLOBAL.
but calling GetRoomList with GetVariable doesnt give me the updated value, only the initial value.
am i missing something? thanks