XboxLiveDevelopment
LeaderBoard Display
Hello, I am Using Xbox live creator program to display Leaderboard. After Signing It doesnot show me the LeadereBoard regarding that player. I have added IntegerStat prefab to the LeaderBoard Class for showing Coind in my game.
Before we move forward, let's double check the following: Just to make sure we're looking at the same thing, are you using the most recent Xbox Live Unity Plugin? Latest Release: https://github.com/Microsoft/xbox-live-unity-plugin/releasesDo you by any chance have the XboxLiveServices prefab on the scene yet? It's a required prefab as it allows you to toggle on and off errors and logs thrown by the various Xbox Live prefabs. Please make sure you enable the logs as it should help us debug. Now let's look at the Stat and Leaderboard details and their behavior within the Unity Editor and UWP Modes: Within the Unity Editor: When you run the scene in the Unity Editor, does the Leaderboard show any entries? It should be showing some fake entries in there. This should help us verify that initial configurations are working correctly. Regarding the StatPanel, if you're running the scene in the editor then the data it's showing does reset every time you restart as it's not actually calling the Xbox Live Services. Once you're running in the UWP mode, that's when the plugin starts talking to the Xbox Live Services for actual data. Within UWP Mode: After building and exporting the project as a UWP (as indicated at: https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/configure-xbox-live-in-unity), that's when the game will start talking to the Xbox Live Services for real data. Every time you update your stats (increment, decrement, etc), the values get updated locally and then this data gets flushed every 5 minutes by the StatManagerComponent script. If your game ends before the 5 minutes, you need to make sure to flush the data manually first to make sure you don't lose that progress. To do that, you'll need to call the following method on the StatManagerComponent making sure to call it for the XboxLiveUser the stat is being written for. In the case of a Single User game, you could use: statManagerComponent.RequestFlushToService(XboxLiveUserManager.Instance.GetSingleModeUser().User, true); My suspicion is the stats updated weren't being flushed in time so when you restart the game, the stats start again at zero and no leaderboard entries get persisted.
Hello, I am Using Xbox live creator program to display Leaderboard. After Signing It doesnot show me the LeadereBoard regarding that player. I have added IntegerStat prefab to the LeaderBoard Class for showing Coins Collected in my game.
Hi Saurabhrun, Could you share a bit of how you're setting up the Leaderboard? Do you have a UserProfile on the scene? What Leaderboard Type did you select in the Inspector of the Leaderboard prefab? Global vs Friends vs FavoritesAlso, have you submitted any values to the stat yet? If you use the StatPanel with your Integer Stat, do you see the number changing? Do you see values in it when you restart the game?
Yes I do have a UserProfile in my scene. After SignIn, I get no Values displayed. My Leaderboard Type is Global Yes I have used StatPanel to show my IntegerStat values which are changing but they initialise from 0 after restart
Before we move forward, let's double check the following: Just to make sure we're looking at the same thing, are you using the most recent Xbox Live Unity Plugin? Latest Release: https://github.com/Microsoft/xbox-live-unity-plugin/releasesDo you by any chance have the XboxLiveServices prefab on the scene yet? It's a required prefab as it allows you to toggle on and off errors and logs thrown by the various Xbox Live prefabs. Please make sure you enable the logs as it should help us debug. Now let's look at the Stat and Leaderboard details and their behavior within the Unity Editor and UWP Modes: Within the Unity Editor: When you run the scene in the Unity Editor, does the Leaderboard show any entries? It should be showing some fake entries in there. This should help us verify that initial configurations are working correctly. Regarding the StatPanel, if you're running the scene in the editor then the data it's showing does reset every time you restart as it's not actually calling the Xbox Live Services. Once you're running in the UWP mode, that's when the plugin starts talking to the Xbox Live Services for actual data. Within UWP Mode: After building and exporting the project as a UWP (as indicated at: https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/configure-xbox-live-in-unity), that's when the game will start talking to the Xbox Live Services for real data. Every time you update your stats (increment, decrement, etc), the values get updated locally and then this data gets flushed every 5 minutes by the StatManagerComponent script. If your game ends before the 5 minutes, you need to make sure to flush the data manually first to make sure you don't lose that progress. To do that, you'll need to call the following method on the StatManagerComponent making sure to call it for the XboxLiveUser the stat is being written for. In the case of a Single User game, you could use: statManagerComponent.RequestFlushToService(XboxLiveUserManager.Instance.GetSingleModeUser().User, true); My suspicion is the stats updated weren't being flushed in time so when you restart the game, the stats start again at zero and no leaderboard entries get persisted.
Related Links
How to have a best time leaderboard for each of my 90 levels?
XBOX LIVE CREATOR SAVE FUNCTIONALITY PROBLEM- PLEASE HELP
Test account on Xbox One
Trying to add a new Xbox Live test account results in error
Creators Program - Unity Plugin MultiUser Example Signin Access Denied
How to reset a leaderboard?
can i use the xbox live api for social app
Tutorial on How to integrate Xbox Live SDK with Creators Program
[UWP] [Xbox One] I am using Monogame/Visual Studio/C# How do I integrate Xbox Live into it properly?
Xbox Live leaderboard in UWP game returns with error 404
Some clarification please...
members of live creatros program cannot publish game for xbox one? - concept approval requires ID
Featured Stat not visible in the Windows 10 Xbox App
At which stage of the game should I block players?
Running into issues Visual Studio 2017 ,and Deployment (Xbox One Creator's Collection Game)
Creators Program New Releases at bottom of Xbox store page?