Thank for reply.
1.- For Trophys etc I am using Reward Service API.
2.- Same for leaderboard
Example how I use API for show leaderboard for Silver Division:
public GameObject grid;
public GameObject prefab;
private string gameName = GlobalContext.gameName;
private string rewardName = GlobalContext.TrophySilver;
private int Max = 100;
RewardService rewardService;
// Use this for initialization
void Start()
{
App42API.Initialize(GlobalContext.APIKEY, GlobalContext.APISECRET);
rewardService = App42API.BuildRewardService();
rewardService.GetTopNRewardEarners(gameName, rewardName, Max, this);
}
public void OnSuccess(object response)
{
IList<Reward> reward = (IList<Reward>)response;
int ScorePos = 0;
for (int i = 0; i < reward.Count; i++)
{
ScorePos++;
Debug.Log("rewardName is: " + reward[i].rank + " UserName: " + reward[i].GetUserName() + " rewardName is: " + reward[i].GetName() + " Point is : " + reward[i].GetPoints());
GameObject go = Instantiate(prefab, Vector3.zero, Quaternion.identity, grid.transform) as GameObject;
ClasificacionPlayerData data = go.GetComponent<ClasificacionPlayerData>();
data.NamePlayer = reward[i].GetUserName();
data.Score = reward[i].GetPoints().ToString();
data.TopNumber = ScorePos.ToString();
}
}
public void OnException(Exception e)
{
Debug.Log("Exception: " + e);
}