Showing a "start game" button for the host

Options
Hi.

I'm having some trouble with writing some code
I'm working on a simple multiplayer menu, but where when a player creates a room. one more has to join, and then he can press "Start Now" or something similar. Is there a way to only show a button for the host? and then the clients will have a button called "Join" which enters them in the game?

I was thinking that I could make a boolean and set it to true if the player is the only one in the room. other people will then have another button.

I'm sorry if my question confused anyone.

Thanks for reading.
-Frank

Comments

  • Tobias
    Options
    We use rooms to match players. The basics are shown in the "Demo Worker" for this.
    To add your "start" button: In your GUI scripts you can check PhotonNetwork.isMasterClient. This is true on only one client. If you also check if the player count is > 1, then you get your start button.
  • Thanks :)