Search Unity

Multiple Social.ReportScore callback issue

Discussion in 'Scripting' started by maynoam, Apr 18, 2015.

  1. maynoam

    maynoam

    Joined:
    Dec 24, 2014
    Posts:
    9
    Hi,

    I'm having an issue reporting multiple scores at the end of my game using Social.ReportScore() (In the iOS GameCenter implementation).
    I have 3 leaderboards and am trying to have a different callback for each score posted in order to track which scores were posted, but for some reason all the score postings fire the last callback which was requested, and not the callback requested for that score post.
    For example the following code:

    Code (CSharp):
    1. Social.ReportScore(10,leaderBoardIds[0],(success)=>{Debug.Log("Report0");});
    2. Social.ReportScore(20,leaderBoardIds[1],(success)=>{Debug.Log("Report1");});
    3. Social.ReportScore(30,leaderBoardIds[2],(success)=>{Debug.Log("Report2");});
    Will eventually finish with 'Report2' being printed 3 times. The scores themselves were posted fine to each leaderboard.
    Is this the expected behaviour?
     
  2. C10yang

    C10yang

    Joined:
    Sep 5, 2015
    Posts:
    1
    Yeah~ I'm making a game and having the same issue.
    I have 2 leaderboards: best score & total score. In Unity, it shows report score to both leaderboards. However, in Xcode, it shows report the total score to totalscore leaderboard twice. Moreover, I can't test the leaderboard, because it doesn't work properly with sandbox account. So far it only shows 1 score uploaded 9 hours ago.

    Hopefully someone can kindly give us answer.
     
  3. genail

    genail

    Joined:
    Jul 2, 2012
    Posts:
    1,045
    Looks like there can be only a single callback handler at time. This means that we cannot execute Social methods in parallel. I cannot find any documentation entry about such restriction. I will try to confirm that

    Can any Unity Technologies dev confirm that this may be a bug?