[Problem]Using Room CustomProperties In An If Statement

Options
I can get the Custom Properties of the current room i am in but i cant use it in if statement guide me on what i am doing wrong.
roomOptions.CustomRoomProperties = new Hashtable() { { "2 Vs 2", 2 } }; // Setting it like this

i can get the number **2**

ExitGames.Client.Photon.Hashtable RoomInfo = PhotonNetwork.CurrentRoom.CustomProperties;

                if (RoomInfo["2 Vs 2"] == 2) 
                {
                    Debug.Log("1");
                }
                else
                {
                    Debug.Log("2 " + RoomInfo["4 Players FFA"]);
                }

Comments