ReportScore(long, string, Action<bool>)
Report a score to a specific leaderboard.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.GameCenterModule
public static void ReportScore(long score, string board, Action<bool> callback)
Parameters
Examples
using UnityEngine;using UnityEngine.SocialPlatforms;using System.Collections;public class ExampleClass : MonoBehaviour{ void ReportScore(long score, string leaderboardID) { Debug.Log("Reporting score " + score + " on leaderboard " + leaderboardID); Social.ReportScore(score, leaderboardID, success => { Debug.Log(success ? "Reported score successfully" : "Failed to report score"); }); }}