文档

​
​

Development

User Acquisition

Monetization

工业

Leaderboards

Unity SDK

Admin API

Client API

Open Unity Dashboard

Leaderboards

此页面不支持所选语言。
LiveOps
​
​
Leaderboards
  • Overview
  • Get started
  • Concepts
  • Tutorials
    • Configuration
      • Using Unity Editor
      • Using the Unity Dashboard
      • Using the CLI
      • Using the REST API
    • Unity SDK tutorial
    • Unity SDK sample
    • Cloud Code samples
  • Reference
  • Privacy and consent
  1. Leaderboards
  2. Write configuration

Integrate with Unity Editor

Author and deploy leaderboard configurations directly within the Unity Editor.
阅读时间3 分钟
最后更新于 8 个月前

The Leaderboards Authoring module (installed with the Leaderboards package) allows you to optionally author and modify Leaderboards configurations directly within the Unity Editor. You can then upload leaderboards from the Unity Editor to the Dashboard by using the Deployment package.
注意
Authoring of Leaderboards configurations in the Unity Editor is only supported in Unity 2021.3 and above.
Leaderboards configurations existing in the Unity Editor allow users to treat their source control as the single source of truth (instead of the version in the cloud), simplifying actions such as rollbacks, bisection, and other common operations. For example, the Leaderboards Authoring module facilitates tasks like keeping client configurations in sync with remote configurations.

Prerequisites

To use Leaderboards configurations in the Unity Editor, you must first install the Leaderboards SDK and link your Unity Gaming Services project to the Unity Editor.

Link project

Link your Unity Gaming Services project with the Unity Editor. You can find your UGS project ID in the Unity Dashboard.
  1. In Unity Editor, select Edit > Project Settings > Services.
  2. Link your project.
  • If your project doesn't have a Unity project ID:
    1. Select Create a Unity Project ID > Organizations, then select an organization from the dropdown menu.
    2. Select Create project ID.
  • If you have an existing Unity project ID:
    1. Select Use an existing Unity project ID.
    2. Select an organization and a project from the dropdown menus.
    3. Select Link project ID.
Your Unity Project ID appears, and the project is now linked to Unity services. You can also access your project ID in a Unity Editor script using
UnityEditor.CloudProjectSettings.projectId
.

Install required packages

To create Leaderboards configurations within the Editor, you must install the following packages:
  • Deployment
  • Leaderboards (2.0.0 or greater)
注意
Check Unity - Manual: Package Manager window to familiarize yourself with the Unity Package Manager interface.
To install these packages and add them to your list of available packages:
  1. From the Unity Editor’s Package Manager window, select + (add) > Add package by name….
  2. Enter
    com.unity.services.deployment
    .
  3. Select Add.
  4. Repeat these steps for
    com.unity.services.leaderboards
    .

Authoring within the Unity Editor

The Leaderboards Authoring module allows you to create, edit, and deploy Leaderboards configurations directly within the Unity Editor.

Create a configuration

Follow these steps to create a Leaderboards configuration using the Leaderboards Authoring module:
  1. In the Unity Editor, right-click in the Project window, then select Create > Services > Leaderboards configuration.
  2. Name the configuration. Leaderboards configurations use their file name as the identifier when uploading to the service.
  3. Press Enter.
The new configuration is now visible in the Project window, and in the Deployment window, accessible by selecting Window > Deployment.
For more information on how to create and modify Leaderboards configurations, refer to Leaderboard assets.

Edit a configuration

To edit an existing Leaderboards configuration, double-click the configuration in the Project window. Leaderboards configurations are in
.json
format and use the
.lb
file extension.

Deploy a configuration

You can deploy a configuration through the Deployment window. For more information, refer to Deployment package.

Deployment window

The Deployment window is a core feature of the Deployment package. It allows all services to have a single cohesive interface for deployment needs, and allows you to upload cloud assets to their respective cloud services.
For more information, refer to Deployment package.

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Prerequisites

      • Link project

      • Install required packages

    • Authoring within the Unity Editor

      • Create a configuration

      • Edit a configuration

      • Deploy a configuration

    • Deployment window


报告此页面的问题