Custom Room Properties returning null?

Hi,

I am trying to set custom room properties for displaying in lobby to other players (master client name in my case)

Here is how I'm setting the customProperties:
            string name = LoginManager.instance.facebookName;
            RoomOptions roomOptions = new RoomOptions() { MaxPlayers = maxPlayers, IsOpen = false, IsVisible = true };
            
            Hashtable custProps = new Hashtable();
            custProps.Add("RoomHost", name);

            roomOptions.CustomRoomProperties = custProps;

            roomOptions.CustomRoomPropertiesForLobby = new string[] { "RoomHost" };
            PhotonNetwork.CreateRoom(roomName, roomOptions, TypedLobby.Default);

I then check for custom properties OnRoomListUpdate()
                Debug.Log(roomInfo.ToStringFull());

This returns:
Room: 'Table 9776' visible,open 1/10 players.
customProps: {}

What's happening here? Any help is greatly appreciated!

Comments

  • Hi @Rupert,

    Thank you for choosing Photon!

    Make sure you are joined to the same lobby and that LoginManager.instance.facebookName is not null.
Sign In or Register to comment.