leaderboard added on terminal/console
This commit is contained in:
13
Assets/LeaderBoardManager.cs
Normal file
13
Assets/LeaderBoardManager.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Unity.Services.Leaderboards;
|
||||
using UnityEngine;
|
||||
|
||||
public class LeaderBoardManager : MonoBehaviour
|
||||
{
|
||||
private const string leaderBoardID = "helix_leaderboard";
|
||||
|
||||
public async void SubmitScore(int score)
|
||||
{
|
||||
await LeaderboardsService.Instance.AddPlayerScoreAsync(leaderBoardID, score);
|
||||
Debug.Log("Score submitted: " + score);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user