PUN Asteroids demo not working correctly
Hi!
I downloaded and imported PUN into a clean Unity project and checked out the demos. However, it seems that the asteroid one is not working and I can't understand why. The players are spawning, but they can't die when they hit an asteroid, and they also don't get points for anything. I debugged the game and it turned out that
Am I missing something here?
Thanks for the help.
I downloaded and imported PUN into a clean Unity project and checked out the demos. However, it seems that the asteroid one is not working and I can't understand why. The players are spawning, but they can't die when they hit an asteroid, and they also don't get points for anything. I debugged the game and it turned out that
photonView.IsMineis always returning false, so for example code in
Asteroid.csthat would destroy the ship after the collision is never called.
Am I missing something here?
Thanks for the help.
0
Comments
-
We did just make major changes to IsMine and caching for it, but one of the tests we conducted was the Asteroids Demo - so that is odd. I'll first try to recreate the problem here. Do you have the very latest Pun2? (2.19.2), there were some quick fixes released to 2.19.0
-
Yeah, I have 2.19.2. Now I've checked and IsMine is working fine in PunBasics Tutorial.0
-
It was a fix in 2.19.2 that just moved the break elsewhere...
Try this:
PhotonNetwork.cs line 2504ish
Replace:view.SetOwnerInternal(parameters.creator, parameters.creator.ActorNumber);
with:view.ownershipCacheIsValid = PhotonView.OwnershipCacheState.Invalid;
0 -
That did the trick! Thanks so much!0
-
It will be in the next release. Thanks for catching that!0