Unity · Schema

Unity Leaderboard

Schema for a Unity Gaming Services leaderboard configuration.

Game DevelopmentReal-Time 3DMultiplayerGame ServicesCloud Gaming

Properties

Name Type Description
id string Unique leaderboard identifier
name string Display name for the leaderboard
sortOrder string Sort order: asc for lowest-wins, desc for highest-wins
bucketSize number Score range per bucket for bucketed leaderboards
resetConfig object Configuration for periodic leaderboard resets
tieringConfig object Configuration for tiered/division-based leaderboards
created string
updated string
View JSON Schema on GitHub

JSON Schema

unity-leaderboard-schema.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/unity/main/json-schema/unity-leaderboard-schema.json",
  "title": "Unity Leaderboard",
  "description": "Schema for a Unity Gaming Services leaderboard configuration.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique leaderboard identifier"
    },
    "name": {
      "type": "string",
      "description": "Display name for the leaderboard"
    },
    "sortOrder": {
      "type": "string",
      "enum": ["asc", "desc"],
      "description": "Sort order: asc for lowest-wins, desc for highest-wins"
    },
    "bucketSize": {
      "type": "number",
      "description": "Score range per bucket for bucketed leaderboards"
    },
    "resetConfig": {
      "type": "object",
      "description": "Configuration for periodic leaderboard resets",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "schedule": {
          "type": "string",
          "description": "Cron expression for reset schedule"
        },
        "archive": {
          "type": "boolean",
          "description": "Whether to archive scores before reset"
        }
      }
    },
    "tieringConfig": {
      "type": "object",
      "description": "Configuration for tiered/division-based leaderboards",
      "properties": {
        "strategy": {
          "type": "string",
          "enum": ["score", "percentile"]
        },
        "tiers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "cutoff": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "created": {
      "type": "string",
      "format": "date-time"
    },
    "updated": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": ["id", "sortOrder"]
}