SCILLLeaderboardRankingItem
class SCILLLeaderboardRankingItem : MonoBehaviour
Overview
This class implements user interface for a leaderboard ranking (i.e. rank position in a leaderboard table). It gets
a LeaderboardRanking via its ranking
property and updates
text and images provided in properties.
Inspector Properties
username
public Text username;
Connect a UnityEngine.UI.Text
component which will be set with the username of the user. The username must be set using
the AuthApi.SetUserInfo before. If no user info is available the
string Guest
will be used.
rank
public Text rank;
The rank of the user will be set into this UnityEngine.UI.Text
component as text with a .
suffix, i.e. 1.
or 10.
.
score
public Text score;
The score of the user will be set into this UnityEngine.UI.Text
component as text. You can use the numberOfDecimals
setting in the SCILLLeaderboard item to format the score into a decimal value.
image
public Image image;
The avatarImage
of the additional user info will be used to load a sprite from the Resources
folder. See
AuthApi.SetUserInfo for more info on this topic.
Please note: The sprite is loaded at runtime and must be within a Resources
folder in your Asset database so that Unity
exposes that asset so that it can be loaded dynamically.