generated from pancake-llc/package
-
Notifications
You must be signed in to change notification settings - Fork 12
Playfab
yenmoc edited this page Dec 23, 2022
·
2 revisions
LEADERBOARD
- install package playfab
- install package ios login (optional if you build for ios platform)
- config setting via menu item
Tool/Pancake/Playfab
- in tab [API Features] enable
Allow client to post player statistics
- in tab [Client Profile Options]
- in
Allow client access to profile properties
enableDisplay Name
,Locations
,Statistics
- in
Allow client access to sensitive profile properties
enableLinked accounts
- in
- install sample leaderboard via PackageManager. You also need to install the package ui effect to run correctly
- in sample leaderboard has already config file, select
GameServiceSettings
in folder Resources to active setting - use
Update Aggregation
menu in menu context of PopupLeaderboard to create table leaderboard for 240 countries just do this once
- replace the code in
#if region replace your code
with your own code to manage popups the way you want - for update score to leaderboard when first time you enter name completed. Example you can find in class
ButtonLeaderBoard
usingvalueExpression
GetComponent<ButtonLeaderboard>().valueExpression += () => UnityEngine.Random.Range(1, 100);
- when you want update score of user in leaderboard you can you method
UpdatePlayerStatistics
int newScore = 100;
AuthService.UpdatePlayerStatistics("name_table", newScore);