09-23-2018 01:51 AM
09-23-2018 02:32 AM
private void Start()
{
try{
Core.AsyncInitialize();
CheckEntitlement();
leaderboardConstructor.LeaderBoardError("Getting scores...");
} catch {
leaderboardConstructor.LeaderBoardError("FAILED");
}
}
void CheckEntitlement()
{
Entitlements.IsUserEntitledToApplication().OnComplete(
(Message msg) =>
{
if (msg.IsError)
{
// User is NOT entitled.
Debug.Log("Error: User not entitled");
UnityEngine.Application.Quit();
}
else
{
// User IS entitled
Debug.Log("Success: User entitled");
CheckForUpdates();
}
}
);
}
09-23-2018 07:57 AM