How do I make it so that it only logs the player into Game Center once?

Hi. I have a leaderboard icon in my game. Every time it appears it logs the player into Game Center. This is a problem because I want the player to only log into Game Center once until they close the app. How can I do this?

Comments

  • jeezzcakejeezzcake Member Posts: 144

    Have you tried putting the Login Behaviour in a Loading Scene, before your Main Menu appears?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    You could also add a boolean attribute to your game called loggedIn and set up a rule like this:

    When loggedIn is false:
    
    Log into game center
    
    Change Attribute loggedIn to True
    

    That way you'll only log in once, when loggedIn is False.

  • VinnyAmatoGamesVinnyAmatoGames Member Posts: 18

    Thank you! That worked!

  • yattamoveyattamove Member Posts: 236

    @jamie_c‌
    Ain't it supposed to be automatic? When already logged in, even if you click a login button or go back to the initial screen if you have an auto login, it won't login again?

Sign In or Register to comment.