Getting Started with this.

Options
Hi there,

I have been looking into this for the last couple days and it still doesnt make sense in my mind, if someone could elaborate that would be fantastic.

At the minute at my games main menu i call Connect which returns my serverstatus as JoinedLobby.

From there when people press Multiplayer then server list i want to show them a list of available games -> I get that.

But when i call CreateOrJoinRoom I get a sserverstatus ConnctedToRoom -. Then Joined which is all great.

My main thing here trying to understand now i how do i get the player from clicking this button to actually loading the map with him in it to be able to actually start the game?

This is confusing my brain to a point where its not even sure if up is up.

Any help would be greatly appreciated.

Thanks

Comments

  • Skar
    Options
    Photon has a lot of callback methods that I'm guessing would be a good solution in this case. When you get to the status of "Joined", photon calls the method "OnJoinedRoom" where you can load your levels or spawn a player or whatever.

    You could have a look at this page
    for more info about different callbacks and when they get called by PUN.

    Example of the 'OnJoinedRoom' method:
    void OnJoinedRoom()
    {
       //Load level or other stuff
    }