I've been having this problem since months and only happens when I have GameSparks sdk imported in a project, whenever I change a script and Unity starts recompiling while I'm playing the Unity freezes, I noticed that if I stop playing before few seconds nothing happens but if I wait too long then Unity freezes so I have close it an open it again.
My freezing problem when unity is stop got solved with 139 version, the other issue (freeze while recompile on play) got fixed months ago with that same script Andrejs posted, works like a charm I found it 10 months ago after creating this thread :)
Strange -- Later I'll try to isolate it to ensure it 100% is gamesparks. Perhaps it's something else? However, we haven't added anything major to our project since we added GS + we only freeze on scenes that contain GS, so the suspicion level is still pretty high :)
Latest SDK, using the scripts earlier posted, etc.
There seem to be slightly different variables in each case here. If this is still effecting you please raise a ticket so we can look into it further for you. Any useful findings will be posted here.
Dylan has kindly tested a fix which has addressed this issue for him. It will be included in an upcoming SDK release. it should be available in the next week or so.
So this is getting frustrating my GameSparks unity plugin was working ok until the new update now when I make a code change it freezes my unity version Unity 5.6.4p4 after reinstalling everything even my windows I found out the problem is PlatformBase.cs file I tried a different project but on Unity 2017 and there seems to work fine tho.
Anyways to solve my current problem on Unity 5.6.4 I just reverted PlatformBase class and now its working fine.
I also got that issue and I actually opened a ticket for it.
It happens with Unity 5.6.4f1 and the latest sdk available (as of today).
It happens when you edit a script and end Unity play mode while reloading the scripts.
If you end play mode before saving your scripts, you won't get any issue.
It can be reproduced with an empty project and the latest sdk using the default GS scene.
I will try to find the famous script Hjupter Cerrud is talking about.
btw, in my case the script doesn't fix the issue. I still get a freeze.
Updating to unity 2017.3 fixed the issue.
They just released a new SDK 2 days ago, no more freeze for me on Unity 5.6. Looks like this issue is finally gone! :D
Yes the latest SDK had a change that addressed this issue. Glad to hear its working for you guys !
Figured out what's happening here, but not sure how to fix it.
This is being caused by a network thread hanging. I use Gamesparks, and OnApplicationQuit I call GS.Disconnect(), which takes care of these threads normally.
However, if there's an error in the game, like an NPE, and I stop the game afterward, OnApplicationQuit won't get called, and this can cause Gamesparks network threads to hang and stay open.
@GameSparks Team I hope this info helps you to fix the error.
It's impractical to develop in this condition.
Yes, that is because somewhere in your code there is an error happening in the Gamesparks request response.
If there is an error in your BaaS implementation Unity will freeze script changes.
All my async operations are spoiled because if GameSpark errors. You need to be very careful right now to find errors.
Their Async implementation is pretty bad and not error proof for Unity.