How do i get the two client's units to match up rather than be incorrect units?
In each screenshot there is only player 1's units and there is an obvious mismatch, i am using photon pun2 for networking and need to match up the units.
For context when a card in the players hand is clicked the player then clicks their respective player zone(colored zone) to summon a unit although on the other client it tends to show up as a completely different unit.
please help.
Answer by VanToRiaXVII · Feb 23 at 04:30 PM
First, you need to figure out if the problem is only from the visual or if it also affects the logic of the characters.
If the problem is only on the visual, then it's probably loading a default asset because it can't find the right one.
If the problem is also within the logic, you would need to make sure you're sending the right character object to PUN2. That way, the receiving player can match the character spawned by the sender. The client needs to receive the right information and interpret it correctly to show the character. So, the issue can arise from the sender not sending the information properly, or the client not being able to interpret the information as it should and match the visual of the sender.
I fixed it by making the Unit and the Unit Mesh into the same object.
Your answer
Follow this Question
Related Questions
Photon synchronization on different devices failes 0 Answers
Automatic Fire lag 0 Answers
Unity Mirror OnStartServer spawn GameObjects 1 Answer
What's wrong with my script ? 0 Answers
I get an error message every time i run this script? Any ideas? 0 Answers