Code: Select all
// 1
RoomVariable var = room.getVariable( "X" );
var.setValue( String.valueOf( "1" ) );
// 2
HashMap<String, RoomVariable> vars = room.getVariables( room );
vars.put( "X", new RoomVariable("2", RoomVariable.TYPE_STRING, null, true, false ) );
// 3
room.setVariable( "X", RoomVariable.TYPE_STRING, "3", false, true, null, false );
// 4
vars.put( "X", new RoomVariable("4", RoomVariable.TYPE_STRING, null, true, false ) );
extensionHelper.setRoomVariables( room, null, vars, true, true);
They all seem to set the value (as viewed in the admin tool) but no message is sent to the client. I am watching the Debug messages in the Unity client. What have I missed?