Getting custom properties of a room

clabs
edited December 2013 in DotNet
I am using the following code to set custom properties for a room at host side :

Hashtable roomProperties = new Hashtable();
roomProperties.Add("abc", "123");
this.GameInstance.OpSetPropertiesOfRoom(roomProperties);
Debug.Log ("room properties
" + this.GameInstance.CurrentRoom.CustomProperties.Count);

on client side :
I am using
foreach (RoomInfo roomInfo in this.GameInstance.RoomInfoList.Values)
{
Debug.Log ("room properties
" + roomInfo.CustomProperties.Count);
}

On host side debug.log gives the value as 1
but while printing the value on client side debug.log gives a value 0
how can we access the custom properties of a room on client side?

Comments

  • I am moving this to the DotNet forum but I can't find the exact class for GameInstance from your code.
    Please let me know what API you use and the version.

    Once set, you have to wait a little on the remote client, so that it can get the update message. Can you make sure it's not a simple timing issue?
  • Hi,
    This problem is solved now. There was something missing in the code. Thanks for your time.