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

More Resources for Universal Windows Platform Games with Fall Xbox One Update
I'm getting DirectXTK errors when compiling the samples
Have Xbox Live Creators access to Avatars?
Can't Download XBox Live Platform Extensions SDK
[XBOX LIVE] [DirectX] [Creators] I get error 0x87DD0005 when logging to Xbox Live
XBox Live C# Samples?
Unreal Engine 4 source code verification
Creators Program Stats
Whitelisted?
XBOX and Hotmail account merging
StatsManager AddLocalUser
Get Microsoft Xbox friends list
Xbox live Api REST
UWP Unity Sample, Missing Assembly
Cannot Update Xbox Live Creators Program Leaderboard
Xbox live c# development (no unity)

Categories

MSDN
.NET Framework
Visual Studio Design a...
SQL Server (Pre-release)
Microsoft Atlas API: D...
Unified Communications
Microsoft Azure
Archived Forums X-Z
In-App Advertising (Ad...
Visual C#
Visual Basic
C++ Standards, Extensi...
Testing with Visual St...
Visual Studio Unit Tes...
Visual Studio Tools fo...
Application Insights (AI)
Register and Manage Ac...
Developing Universal W...
Windows Imaging Compon...
Hardware Development B...
Developing Apps for Sh...
SharePoint Legacy Vers...
Workflow Manager 1.0
Azure HDInsight
Azure API Management
Azure CDN
Azure SQL Data Warehouse
Azure Data Catalog
Azure Analysis Services
Windows Presentation F...
Visual Studio Visualiz...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
Software Modeling Tools
Commerce Server 2009
Reactive Extensions (Rx)
JScript Native
Microsoft Robotics - S...
Microsoft Device Emulator
.NET Compact Framework
Windows Mobile Develop...
Visual Studio Smart De...
Data Mining
SQL Server Reporting S...
SQL Server Notificatio...
Getting started with S...
SQL Server Data Wareho...
SQL Server Samples and...
Microsoft StreamInsight
SQL Server Master Data...
SQL Server Manageability
SQL Server In-Memory T...
Windows Embedded Compa...
SQL Server 2012 Spatia...
Windows Server 2008 Ap...
Bing Maps: Map Control...
MSDN Magazine
Office Live Basics, Es...
Project Server General...
Microsoft Unified Comm...
Microsoft Online Syndi...
Connected Services Fra...
Microsoft Security Dev...
Visual Studio Report C...
Retired SharePoint Wor...
.NET Framework 4 setup...
.NET Framework 4: Wind...
.NET StockTrader Sampl...
ADO.NET Entity Framewo...
Azure Troubleshooting,...
Building Windows Store...
Innovate on Office
LightSwitch HTML Clien...
Microsoft adCenter: De...
MS-Build, Multi-Target...
Storage Platform – ATA
SyncFx - Microsoft Syn...
SQL Server 2014 Report...
SQL Server 2014 Master...
Team Foundation Server...
Tellme Studio (retired)
Transactions Programming
Visual C++ Express 200...
Visual J# General (Ret...
Visual Studio Async CTP
Visual Studio Code Ana...
Visual Studio Editor i...
Visual Studio Guidance...
Visual Studio Performa...
Visual Studio Online "...
WCF Data Services (Pre...
Web Development in Vis...
Windows CardSpace ('In...
Windows Desktop Vista ...
Windows Events
Working with Data in W...
Windows Phone Preview ...
.NET Native Preview
Skype Web SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile