Check if Client
Options
So in my game, when I finished putting photon views on everything, and when I tested out the game, I could control the two players with the same controls!
In uNET, all I had to do was check "localPlayer" and that would fix everything.
Is there anyway to do this with PUN?
In uNET, all I had to do was check "localPlayer" and that would fix everything.
Is there anyway to do this with PUN?
0
Comments
-
Edit: I got it to work by using "if (!PhotonNetwork.LocalPlayer.IsLocal)
return;"0 -
Hi @SullyBully,
if your class inherits from `MonoBehaviourPun` you can usebool isLocal = photonView.IsMine || !PhotonNetwork.IsConnected;
`!PhotonNetwork.IsConnected` is there for the case when you want to run your map without connecting to the server.0