Search Unity

Third Party PhotonNetwork : Need help for Room.CustomProperties

Discussion in 'Multiplayer' started by French_Gumiho, Oct 22, 2016.

  1. French_Gumiho

    French_Gumiho

    Joined:
    Aug 25, 2015
    Posts:
    2
    Hello everyone !
    Today I stuck on a huge problem for my multiplayer game.
    So, I'm using PhotonNetwork and I'm trying to get a value from CustomProperties of the created room.
    What I want to do is to load a scene according to the value associated with a key in Room.CustomProperties.
    I don't know how to do this ... It would be so cool if anyone could help me ! :)

    Example :

    ExitGames.Client.Photon.Hashtable roomParams = new ExitGames.Client.Photon.Hashtable();
    roomParams.Add ("MAP", curMap); (where "curMap" is an variable defined before that contains the name of the scene to load)
    RoomOptions options = new RoomOptions();
    options.CustomRoomProperties = roomParams;

    And here is the problem ... how to get this value to load a scene with PhotonNetwork.LoadLevel() ?

    Thans you really to much ! ^^
     
  2. French_Gumiho

    French_Gumiho

    Joined:
    Aug 25, 2015
    Posts:
    2
    EDIT : I finally found how to do it ! :)