Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

It says "Leaderboard service currently not available" when I click on it immediately for the first time after reloading the game. But if I reload the game, and wait for a little while and then click it, it works fine. I am guessing there is some async call when you get to the main menu that fetches the leaderboard, and the leaderboard code just checks if the leaderboard is present or not and doesn't check if we are currently fetching the leaderboard? Just a guess though, as I was not able to find the sourcecode on the page

(1 edit)

Thank you for your reply,

Yup, you're pretty much bang on. Do you think that I should try edit the Leaderboard so it can update if it receives the Reply after the Leaderboard Screen has been opened automatically? I'm not 100% if that will cause more problems or not.

(+1)

That shouldn't be too hard actually. Can do it with coroutines, I am pretty sure:

IEnumerator RenderLeaderboardEnumerator() { 
   // enable the loading spinner
    while (leaderboard_hasn't_loaded) {
        // update the loading spinner() * Time.deltaTime or something idk;
        yield return new WaitForEndOfFrame();
    }
    // disable the loading spinner
    RenderLeaderboard() ;;; 
}
...
    // in your OnEnable or wherever you are fetching:     StartCoroutine(RenderLeaderboardEnumerator());


Something like that, I imagine. You will have to fill in a lot of the blanks though

Thank you very much for the help! I'll try and work something like this into the game and release an update in a few hours.