void Start() { if (playerHighScoreDaily == 0) { playerHighScoreDaily = PlayerPrefs.GetInt("HighScore_"+ utcDate.Date.Day); playerHighScore = PlayerPrefs.GetInt("HighScore_Global"); } hcgLeaderboard = new HCGLeaderboard(hcgLeaderboardURL); hcgLeaderboard.AddListener(this); #if UNITY_WEBGL accountID = WebManager.instance.GetURLParam("playerID"); Debug.Log("Call GetPlayer"); StartCoroutine(hcgLeaderboard.HttpCall(new GetPlayer(accountID))); #else accountID = SystemInfo.deviceUniqueIdentifier; #endif }
public void OnDestroy() { if (hcgLeaderboard != null) { hcgLeaderboard.RemoveAllListener(); hcgLeaderboard = null; } }