Unity SDK Quick Start
Get your leaderboards running in Unity in minutes with simple API integration!
Unity 2022.3.11f1+.NET Standard 2.0No External Dependencies
4 Simple Steps to Get Started
1
Download & Import
Get the Unity package and import it into your project
The Unity package contains the SDK scripts, types, and example usage.
After downloading:
- Double-click the .unitypackage file
- Click "Import" in Unity's import dialog
- Wait for import to complete
2
Configure API Key
Set up your Rankora API key in the settings
Configure your API key to connect to Rankora's leaderboard service.
Setup steps:
- Go to Rankora API → Open Settings in Unity menu
- Paste your API key from the Rankora dashboard
- Click "Save" - you're all set!
3
Basic Integration
Add basic leaderboard functionality to your game
Add basic leaderboard functionality to your game using the SDK classes.
Basic integration:
- • Use
RankoraPlayer.Instance
for player management - • Use
RankoraLeaderboard.Instance
for leaderboard data - • Subscribe to events for real-time updates
- • Call
Sync()
to submit scores
Check the Advanced Features guide for detailed examples.
4
Test & Play
Press play and test your leaderboard integration
Test your leaderboard integration by pressing play.
What to test:
- • Player score submission
- • Leaderboard data fetching
- • Event system functionality
- • API communication
Basic Integration
Simple API integration! The SDK provides easy-to-use classes for leaderboard management. You'll need to create your own UI components to display the data.
Player Management
Easy player data handling and score submission
Event System
Reactive updates through the event bus
Leaderboard Data
Fetch and manage leaderboard entries
Example Usage
Basic Score Submission
Simple example of how to submit a player score
Here's a basic example of how to use the SDK in your game:
Basic Score Submissioncsharp
// In your game manager or player controller
using Rankora_API.Scripts.Rankora.Main;
using Rankora_API.Scripts.Rankora.Types;
public class GameManager : MonoBehaviour
{
void Start() {
// Load existing player data
RankoraPlayer.Instance.Get();
// Listen for player updates
RankoraPlayer.Instance.OnPlayerUpdate.Subscribe(player => {
Debug.Log($"Player: {player.PlayerName} - Score: {player.Score} - Rank: {player.Rank}");
});
}
// Called when player completes a level
public void SubmitScore(string playerName, int score) {
RankoraPlayer.Instance.PlayerName = playerName;
RankoraPlayer.Instance.Score = score;
// Submit to server
RankoraPlayer.Instance.Sync((response) => {
if (response.success) {
Debug.Log($"Score submitted! New rank: {response.rank}");
}
});
}
}
What's Next?
Ready to Customize?
Learn how to customize the SDK behavior and appearance
Need More Control?
Explore the advanced features and API