Unity stuck on play.
Options
After importing latest PUN v1.91 unity got stuck after hitting play second time. It works fine with first play but after stopping and playing again it just hangs with not responding message. What might be the cause ? Is there any bug in newer version or is it because of my project size but its around 110 MB size ?
0
Comments
-
I actually got it working but with .NET 4.x Equivalent. What could be wrong with .NET 3.5 ? Can someone explain?0
-
Hi @avimon,
It's funny that .NET 4.x works well for you as it's still not considered stable for us.
I think you're using Photon Chat and not properly disconnecting chat client.
Try adding something like this and see if it helps:public class SomeMonoBehaviour : MonoBehaviour { private void OnApplicationQuit() { if (chatClient != null) { chatClient.Disconnect(); chatClient.StopThread(); // could be optional } }
0 -
I'm still curious to know why is Unity stuck.
Did you try PUN demos? Photon Chat demo for instance. Do they cause the same issue?
Did you try removing Photon calls and see if it helps?Will there be any problem if I use .NET 4.xIt should work yes but as I told you, we officially do not claim it's stable yet, please report any issue to us if you find any.0