Skip to main content

LeaderboardDefinition

A class in Root.Township, the global namespace.

Asset for a leaderboard (a course), with its size and whether lower scores are better.

Constructors​

MemberWhat it is
LeaderboardDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private string courseNameBacking field for CourseName, the name of the course or challenge ranked.
private bool isLowestTrue when the lowest score ranks first (probably for times). Default true.
private int sizeHow many entries the leaderboard keeps. Default 5.

Properties​

MemberWhat it is
string CourseName { get; }Course name shown for the leaderboard.

Methods​

MemberWhat it is
LeaderboardDefinitionData GetData()A LeaderboardDefinitionData with this definition, its hash, name, size and lowest-is-best flag.

Used in​

Members of other types that take, return or hold a LeaderboardDefinition: