'Issues with playfab leaderboard
Im having issues with PlayFab, What im trying to do is have the wave number recorded and sent off to the leaderboard when the game is over but I dont know how to connect the wave number to the playfab leaderboard. I have been trying to use this line: playfabManager.SendLeaderboard(here I have to put an int)
to send to the leaderboard. This is the code to get the wave number
EnemyWaveManager.Instance.GetWaveNumber()
Solution 1:[1]
Playfab leaderboards are populated based on player statistics. So this means you should update player statistics (UpdatePlayerStatistics).
If wave number is a value common to all players in the game, use instead TitleData to keep that kind of data.
Solution 2:[2]
I think Benry got the idea, but I want to add some comments on Title Data. Since the wave number should be the data for ranking in a Leaderboard. It should not be stored in title Data. Title Data is a cached resource, which doesn't support multiple writes at the same time. It is more suitable for global static data. You may check https://docs.microsoft.com/en-us/gaming/playfab/features/data/titledata/quickstart for more details.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Benry |
Solution 2 | Seth DU - MSFT |