- Home /
Unity Photon Transform Issues
Hi, so I'm fairly new to using Photon Networking and multiplayer in Unity and I've been stuck with an issue for a few weeks that I can't seem to fix. I have a game where you select a player and it instantiates a certain prefab determining on the player you selected and loads a new scene with the help of some tutorials I found on YouTube. The problem is with my photon view's and my photon transform view's I think or possibly my movement script. What happens is, I start the game and load in one player and everything works fine. Then when I open a second build, all of a sudden one build can control both characters, and the other build can't control anything. I have photon views and transform views on all of my prefabs and have been lost trying to fix this issue forever. Also none of the movement seem to be synchronized across the game as I might move the characters left on one build and they will not move on the second. I don't know if anyone has any clues on how to fix this but I would be more than happy to answer any questions if anyone knows a possible solution. Here is what I thought I was supposed to be doing for the movement code - private void FixedUpdate() { if(PV.IsMine) { ApplyMovement(); CheckSurrondings(); } }
Any help would be massively appreciated.
This is an ownership problem. Basically you need to make sure each player belongs to the right controller. It's a bit too complicated to explain in a single answer, but lookup photon ownership.