Sign In Register

How can we help you today?

Start a new topic

Unity SDK locks up Unity within the editor and dissalows quiting game in builds

After authenticating with a DeviceAuthenticationRequest within the Unity Editor it can completely lock up "play" mode without ever being able to return to the editor except by using task manager to close unity and re-open it.

Games built with gamesparks included, after executing a DeviceAuthenticationRequest are never able to quit, after calling "Application.Quit()" the game locks up in that wanting-to-quit state never actually exiting.

Hi Clive

What version of the unity SDK are you using ? What Unity Editor version are you testing on currently ? 




I'm using GameSparks SDK:

on Unity: 2017.3.1f1

I have found the cause.

When GameSparksUnity is loaded a second time in a new scene it causes this.

I've worked around this by loading it once, ensuring it uses DontDestroyOnLoad ( ) and ensuring there is forever one instance and only that instance for the duration of the game's execution.


Nice catch -- I'll try this soon. I've been dying for a fix for this if it's the same as this:
I thought most of the GS scripts already have a DontDestroyOnLoad, though? I'll follow up when I get home in a few days.


Yes they do seem to have DontDestroyOnLoad and when you load it, again in another scene some sort of conflict happens with it being loaded twice simultaneously. Apologies if my earlier post was unclear in this regard. I was attempting to be clear on my process by offering all pieces of information rather than murkying the waters.

I had GameSparks within my main menu only (with don't destroy on load). When I exiting a game, after losing all lives for example, and going back to the main menu it was there again - now we have two --- this is what caused my particular conflict. What I did in the end was create a new unity scene called "bootstrap" which had gamesparks dontdestroyonload inside it, and then loaded the main menu after that. Now if you return to the main menu gamesparks travels everywhere, but just that one instance of gamesparks and the problem is solved (for me).

Login to post a comment