Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Problem with GameCenter display after locking the device

Discussion in 'iOS and tvOS' started by xema25, May 10, 2016.

  1. xema25

    xema25

    Joined:
    Aug 24, 2013
    Posts:
    37
    Hi guys, a weird thing happened to me.

    I had no issues setting the achievements and leaderboards for game center and when I call Social.OpenLeaderboards or Social.OpenAchievements it opens the GameCenter interface perfectly.

    But if i lock the device or suspend the app while the gamecenter is opened in the app. When I resume the app the game center is closed and Im not able to open it back and the user is still logged in.

    In other games when you lock the device with the game center interface and you come back it is still displayed.

    Please any idea hoy to solve this? Thanks!
     
  2. xema25

    xema25

    Joined:
    Aug 24, 2013
    Posts:
    37
    I mean, the thing is that on the Resume call of my game I am not doing anything to hide the GameCenter View and I dont know why after suspending my game the GameCenter Screen is automatically closed. Maybe the game thinks that is still open and thats way it's locked :S

    Any help will be much appreciated :)
     
  3. xema25

    xema25

    Joined:
    Aug 24, 2013
    Posts:
    37
    If nobody knows... Any idea on where to look for help?
     
  4. xema25

    xema25

    Joined:
    Aug 24, 2013
    Posts:
    37
    Ok... so nobody had this issue?

    I use the functions Social.ShowLeaderboardUI and Social.ShowAchievementsUI and I check that Social.localuser.authenticated is true before calling them.

    The thing is that the user is authenticated, I open the Leaderboard or the achievements and it works!.

    BUT! if I suspend the app with GameCenter (leaderboards or achievements) screen open, when I resume the game the gamecenter display has been closed automatically and even tthough I am still authenticated, the functions ShowLeaderboardUI and AchievementsUI do NOTHING.


    Help :)


    Thanks!