PUN Demo Problems

KleptoLizard

New member
Issues Encountered:
Players cannot see each other after connecting.
Weapon on back of connecting client player flipping constantly from back to hand position.
Firing the rifle causes a massive feedback loop of both characters firing faster and faster.

Steps taken to reproduce:
Imported UCC: 2.2.5 and ran input and layer setup buttons
Installed Pun: 2.22 Photon lib: 4.1.4.5
Then the latest PUN-Opsive multiplayer addon
Running Unity LTS 2017.4.32f

Error Messages:
This is the first error from which the others seem to originate:
"Object reference not set..."
SpawnPlayer (Photon.Realtime.Player newPlayer)

When this error is double-clicked, it opens to line 197 which reads:
"data[i * 4 + 3] = m_Players.Owner.ActorNumber; "
The console says this is called on line 239 of the OnPlayerEnteredRoom method
" SpawnPlayer(newPlayer); "

When I go to the definition of the Player object labled Owner,
it takes me to the ResetOwnership method of the PhotonView class.
At this point I can't make heads or tails of what I'm reading.

I noticed someone having a similar problem and the responding admin said
that the problem was on Photon's end and that a newer version worked around the problem.
Have they re-broken it?

Also noticed that the Ownership region has several methods like SetOwnerInternal.
Can I use these to override whatever it's doing wrong?
Would really appreciate any help.
 
Last edited:
It looks like you are running an older version - the latest version supports Unity 2018.4 and above.
 
An older version of which? Is the Opsive plugin too old? Or the PUN too old?
Either way, is it possible to fix this myself?
If it's simply a mistake with establishing Ownership at spawn, then it feels like I'm one line of code away from resolving it.
If I know _which_ program is obsolete then I might be able to compare the old vs new code and manually update those specific methods.
 
You are running Unity 2017 which is no longer supported by any of our assets. I recommend upgrading that and then ensuring you are on the latest version of the assets.

I just tested a fresh project and didn't hit any issues with the PUN add-on.
 
Top