The GameSparksUnity script must be run once, preferably in the first scene
The GameSparksUnity script must be run as a singleton with DontDestroyOnLoad
This procedure worked in older versions of GameSparks. However, as of GameSparks SDK version 5.6.3.205, the GameSparksUnity script no longer behaves as described.
If we only put the GameSparksUnity script in the first scene, using the exact method described in the documentation, GameSparks does not work in other scenes. All requests fail and no data is sent to or loaded from the server
If we don't put the GameSparksUnity script in any scene, GameSparks works correctly and data is communicated with the server
If we put the GameSparksUnity script in every scene, and don't make it a DontDestroyOnLoad singleton, the GameSparks works correctly and data is communicated with the server
Is the documentation inaccurate? Has proper usage of the GameSparksUnity script changed?
1 Comment
Customer Support
said
over 4 years ago
Hi Kevin,
I've tested running it from the initial scene and it's working fine in any subsequent scenes for me as the documentation describes. Have you made any changes to the SDK itself to alter its behaviour ?
Kevin Foley
According to the GameSparks for Unity documentation ( https://docs.gamesparks.com/getting-started/using-authentication/unity-authentication.html ):