- Home /
Question by
marcelo_gazzaneo · Jun 25, 2021 at 09:39 PM ·
photonpun
Unable to set CustomProperties on JoinRandomRoom() method
Hello, I'm trying to Create or Join a room of a specific Game Mode, therefor, I'm setting a custom property on JoinRandomRoom(), but once it doesn't find a room with the property, it creates one with none.
public void FindMatch ()
{
Hashtable roomProps = new Hashtable() { { "gm", 1 }};
PhotonNetwork.JoinRandomRoom(roomProps, 2);
}
When OnJoinedRoom() is called, I'm counting the amount of custom properties set just to confirm, but the result is 0.
public override void OnJoinedRoom ()
{
Debug.Log( "Qtt prop: " + PhotonNetwork.CurrentRoom.CustomProperties.Count );
}
What am I doing wrong? Can anyone help please?
Comment
Your answer