Player spawing but not connecting to camera or input

nathanj

Member
Hi Justin,

Just trying out the PUN add on and I have followed the setup and everything works in editor but when I build my little demo scene the player spawns but doesn't receive input and the camera doesn't connect to them.

And, if I open a second window no players are visible and the second player does not appear in the first window.

Any ideas what could be happening?

Using all the latest opsive stuff and Unity 2019.3.6

Thanks in advance,
Nathan
 
Last edited:

Justin

Administrator
Staff member
Does the demo scene work? You could debug this by placing a breakpoint within SpawnManager.SpawnPlayer and see if it is being called for the remote player. If it's not being called then Photon isn't done loading the room yet (maybe try a different region?)
 

nathanj

Member
Thanks Justin,

Just tried the demo scene in my project and it's the same. The canvas is there and the player is visible through the canvas but all their weapons are equipped and they're standing idle. No input is working.

I did just start a new project in unity 2019.3 and added UCC, Pun2, and the Addon and everything works as expected.

So it's obviously something in my build that is causing this.

Thanks for your help
Nathan
 

nathanj

Member
Hey again,

So I did some testing and I'm wondering if Unity's new Asset Database is doing something weird here. I've done a lot of experimenting today trying to figure out what's causing the error on my system.

If I make a new project in 2018.4.whateverTheLatestIs and then install UCC, the Pun2, then the Opsive Pun Addon the demo builds and works fine.

If I make a new project in 2019.3.6 and then install UCC, the Pun2, then the Opsive Pun Addon the demo builds and works fine.

If I make a new project in 2018.4.whateverTheLatestIs and then update to 2019.3.6 (and update the asset database to V2) install UCC, the Pun2, then the Opsive Pun Addon the demo builds and doesn't work. It gets stuck loading into the scene from the waiting room. I've tried this twice and the same result happens.

I should mention that this is slightly different that what I'm experiencing in my main build, but maybe it's related?

Nathan
 

Justin

Administrator
Staff member
Hmm.. I'm not sure. Does the SpwnPlayer breakpoint get trigger? If SpawnPlayer doesn't get triggered then it's something on the PUN side of things since the add-on doesn't even have a chance to spawn because the scene isn't fully loaded yet.
 

nathanj

Member
Yeah, this was a weird one. I managed to get it sorted by slowly mixing files between a working older version and the updated version.

Someone on my team forced the upgrade to 2019 and I wishing I had done it - and waited for an lts version. But oh well, seems to be working now. Thanks again, Nathan
 

zroc

New member
If I make a new project in 2018.4.whateverTheLatestIs and then update to 2019.3.6 (and update the asset database to V2) install UCC, the Pun2, then the Opsive Pun Addon the demo builds and doesn't work. It gets stuck loading into the scene from the waiting room. I've tried this twice and the same result happens.

Usually this is in indication that the scene your trying to load is not included in the build so it can't find it and just looks like it's stuck.
 
Top