question

Mourad sahloul avatar image
Mourad sahloul asked

My leaderBoard not load data in other devices

i'm using playfab leaderboards to display the TOP 5 in the week .. everything is working properly in unity but when i build my application and tested in my phone the leaderboard not loading data ..

this in unity ( everything good ) and the TOP 5 players are shown

This in my Phone ( no data shown )

Leaderboards and Statistics
s7i7.png (54.1 KiB)
error.png (126.6 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please confirm that is this display issue is caused by failed PlayFab API call or not? You can follow the Unity documentation -- Unity - Manual: Debugging C# code in Unity (unity3d.com), especially the section -- Debugging on Android and iOS devices to debug the code of your project on the mobile phone. If the call of the API GetLeaderboard does fail. Could you please provide the detailed error message for our reference? The code to retrieve the detailed error message of a failed API call could be something like this.

    private void OnFailure(PlayFabError error)
    {
        Debug.Log(error.GenerateErrorReport());
    }
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mourad sahloul avatar image Mourad sahloul commented ·

there's no error on playfab api call

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Mourad sahloul commented ·

Can you use the Debug.log() to print the API successful result? The code could be something like this.

private void OnGetLeaderboardSuccess(GetLeaderboardResult obj)
    {
        Debug.Log(obj.Leaderboard[0].StatValue.ToString());
    }

If you can print any content using this method, the PlayFab API should work fine. UI text is not displayed may be caused by other reasons, like the mismatched materials, etc. For the generic UI display issue, you can ask it in the Unity forum.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.