Hello Everyone ..
I am building 4 players online game .. I have figured to spawn two players only in different places .. but I need to spawn another two players in another different places .. PLEASE HELP
here is my C-Sharp code:
void SpawnPlayer()
{
if (PhotonNetwork.IsMasterClient)
{
playerPrefab = PhotonNetwork.Instantiate(playerPrefab.name, new Vector3(0, -800, -315), Quaternion.identity);
}
else
if (!PhotonNetwork.IsMasterClient)
{
playerPrefab = PhotonNetwork.Instantiate(playerPrefab.name, new Vector3(0, -800, 315), Quaternion.identity);
}
}
Trending Articles
More Pages to Explore .....