Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Show "START GAME" button after all players connected.

$
0
0
Hello everyone, I'm very noob at programming and really new to Photon. I'm making a 2 players coop game with multiple lobbies and my problem at the moment is that I don't know how to make the "START GAME" button to be visible only when the lobby got 2 players. This is what I came up with which is not working. Thank you!

if (PhotonNetwork.CurrentRoom.PlayerCount == 2)
{
startGameButton.SetActive(true);
}
else
{
startGameButton.SetActive(false);
}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>