PUN causing Unity editor to freeze/hang

Options
Hie. My Unity 3D is hanging and I'm sure because of PUN. Here is what happened. I implemented parts of my project with PUN and it worked perfectly, the problem of hanging up started when I imported PUN into my project. So to test this theory, here is what I did.

  • I removed all PUN related files and commented out any code that relied on PUN and Unity started running okay.

  • Then to make sure PUN is the problem I imported it back into the application.

  • Then before refactoring my code to use PUN I ran my project and Unity didn't freeze for the entirety of the test.

  • I then implemented logic to connect to the Photon server and open a scene then Unity started freezing and the only way to work with Unity is to kill it via task manager and restart it.

  • Another thing I noticed is that even without connecting to the Photon server Unity will still hang
Here are my specs
Unity 2018.1.6 then switched to Unity 2018.2.14 to test if it is Unity related
PUN 2 V2.5

Can you please get onto this. I'm on a tight deadline and I can't handle misbehaving plugins right now.

Best Answer

  • Wasu_Studio_01
    Answer ✓
    Options
    I tried various things and what worked for me was to roll back on the version of PUN and use PUN Classic.

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Wasu_Studio_01,

    Thank you for choosing Photon!

    Could you try importing PUN2.5 into a fresh clean new project of Unity 2018.1.6 or 2018.2.14 and run the demos and see if it makes Unity hang?
    If it does not hang then the issue is not in PUN itself but somewhere in your code.

    I then implemented logic to connect to the Photon server and open a scene then Unity started freezing
    This is a hint of where the root cause could be.
  • Wasu_Studio_01
    Answer ✓
    Options
    I tried various things and what worked for me was to roll back on the version of PUN and use PUN Classic.