Sign In Register

How can we help you today?

Start a new topic
Answered

Log out?

I can't find any code examples or methods in the SDK for logging the client out of GameSparks.  How do I log the user out? (Unity SDK)


Best Answer

I managed to find some example code with GS.Reset() being used for logging out in the Unity client.  Tested it and it works well.  If I'm logged in with FB, then I need to also call FB.Logout at the same time.


If you need to disconnect from the client you can use GS.Disconnect()
from cloud-code you can use Spark.getPlayer().disconnect(true);

 

Answer

I managed to find some example code with GS.Reset() being used for logging out in the Unity client.  Tested it and it works well.  If I'm logged in with FB, then I need to also call FB.Logout at the same time.

Hey Rich!

Could you please provide the code you're talking about?
Failed to find it myself :(

Login to post a comment