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
photonView.IsMine
is always returning false, so for example code in
Asteroid.cs
that would destroy the ship after the collision is never called.
Am I missing something here?
Thanks for the help.

Comments

  • emotitronemotitron ✭✭
    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.
  • Yeah, I have 2.19.2. Now I've checked and IsMine is working fine in PunBasics Tutorial.
  • emotitronemotitron ✭✭
    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;
    
  • That did the trick! Thanks so much!
  • emotitronemotitron ✭✭
    It will be in the next release. Thanks for catching that!
Sign In or Register to comment.