> For the complete documentation index, see [llms.txt](https://docs.candy-smith.com/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.candy-smith.com/main/match-3-kit-home-design/services/leadboard-and-cloud-save-setup.md).

# Leadboard and cloud save setup

### 1. Unity Dashboard Setup

* Go to [https://dashboard.unity3d.com](vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)
* Select or create your project
* Enable **Leaderboards** service
* Click "Create Leaderboard"
* Set **Leaderboard ID**: `global_leaderboard` (must match code)
* Choose **Sort Order**: Descending (highest scores first)
* Choose **Update Type**: Keep Best or Keep Latest

### 2. Unity Editor Setup

* Go to **Edit → Project Settings → Services**
* Link your project to Unity Cloud
* Enable **Leaderboards** service

### Step 1: Unity Dashboard Setup

1. Go to <https://dashboard.unity3d.com>
2. Select your project
3. Click "Cloud Save" in the left menu
4. Click "Set up Cloud Save"
5. Enable the service

### Step 2: Link Project ID

1. In Unity Editor, go to `Edit > Project Settings > Services`
2. Click "Use an existing Unity project ID"
3. Select your organization and project
4. Project should show "Services" as enabled

#### Cloud Code for gift sending

1. Go to  [https://cloud.unity.com/](https://cloud.unity.com/home/organizations/10170585042969/projects/65784a74-c686-4f46-aa4d-66dd84bde811/environments/58b5239f-77cc-4510-9733-5ceb27113279/cloud-code/scripts/SendGift) and open Cloud Code

2. Add  [SendGift.js](https://gist.github.com/dps999/6b1d5f611bc71a9183c79d8c5c43088d) to the cloud code

3. Add parameters:

   1. *receiverId* as string
   2. *senderId* as string
   3. *senderName* as string

4. Add [ClaimGift.js](https://gist.github.com/dps999/294df8763443601599ae1416a1533458) to the cloud code

5. Add parameters:
   1. giftId as string
