- Home /
Question by
NadirAta · Mar 31, 2021 at 09:26 AM ·
instantiateplayerphotondifferentspawn points
photon Spawn 4 players in different positions
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);
}
}
Comment
Your answer
Follow this Question
Related Questions
Player prefab instantiation 1 Answer
Bullet wont collide for the other player (PHOTON+UNITY) 1 Answer
[PHOTON] Send and recieve only for the same zone 0 Answers
Photon switches player's camera 2 Answers