Unity SDK Setup Guide
This guide walks you through the steps to set up the Myria Leaderboard Unity SDK in your Unity project. The process is simple and can be completed in just a few minutes.
Step 1. Import Unity SDK
Installing the Myria Leaderboard Unity SDK is straightforward, with multiple setup options depending on your preference.
Install using git
Ensure that Git is installed on your computer before proceeding.
- Open the Unity editor and navigate to the Package Manager by selecting Window > Package Manager.
Access to the Package Manager:
- In the Package Manager, you should see the following interface:
- Click the + button in the top-left corner:
- Go to the Leaderboard Unity SDK GitHub repository, and copy the git link:
- Paste the GitHub link into the textbox in the Package Manager:
- Click Add to import the Leaderboard SDK into your project.
Once you import, the process would take 1 - 2 minutes for loading and installing into the Package Manager.
Once the importing is finished, you should see the Package section for MyriaLeaderboard.
Install using source code
To be update.....
Step 2. Run and compile the Unity project
After importing the SDK, run and compile your Unity project to generate the configuration resource object.
- Run the unity project after first time importing the SDK. Click the Play button in the Unity Editor to generate the configuration resources.
- You should now see the resources object with detailed parameters ready to be filled in.
- Use the placeholders in the config resources to input the necessary values.
Step 3. Update config for environments variable
Retrieve and update the necessary environment variables in the Resource Config Object:
Developer Api Key: This API key, requested from the Myria admin, grants access to the Myria Leaderboard Portal.
Public Key: Public RSA key which is generated from the local server. For more details, refer to the Generate RSA Key Pairs section.
Env: Select the appropriate environment (Staging, Prod). Using Staging for testing and Prod for Production use.
AllowCustomURL: (Required to be checked) If using the game backend template, ensure this option is enabled.
CustomURL: Enter the local server URL. Example: http://localhost:3001.