com.shephertz.app42.paas.sdk.csharp.game can't work with Class Game

0 votes

Hello

 

I want to make a leaderboard to show N top rankings. Here is my code

using UnityEngine;
using System.Collections;
using System;
using com.shephertz.app42.paas.sdk.csharp;
using com.shephertz.app42.paas.sdk.csharp.game;
using com.shephertz.app42.paas.sdk.csharp.user;

public class Leaderboard : MonoBehaviour, App42CallBack {
    public string gameName = "Sliding Puzzle";
    public int max = 5;
    // Use this for initialization
    void Start () {
        App42Log.SetDebug(true);        //Print output in your editor console  
        App42API.Initialize("78e127a04f3fba734e42bd76dbd6cc0e3d2dca95b9a110d10a86e2d7877f4993", "7a7ee19b94644eb0a230b2c6527a7669a7fe83ac62bf63ff36ba32d2b607db0b");
        //ScoreBoardService scoreBoardService = App42API.BuildScoreBoardService();
        //scoreBoardService.GetTopNRankings(gameName, max, this);
    }

    void OnGUI()
    {

    }
	
	// Update is called once per frame
	void Update () {
	
	}

    public void OnSuccess(object response)
    {
        Game game = (Game)response;
        App42Log.Console("gameName is " + game.GetName());
        for (int i = 0; i < game.GetScoreList().Count; i++)
        {
            App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
            App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
            App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
        }
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}

Sorry, my code isn't done yet.

The problem is, when I preview the class I bold, it just show "Class Game", not "com.shephertz.app42.paas.sdk.csharp.game.Game".

I tried it in the sample, it works perfectly. But when I tried it my self, it's not working. So I can't use another feature like 'Game.Score'.\

Mine was like above

It was suppossed to be like this.

asked Oct 30, 2016 in Unity by Andre Setiawan (10 points)
edited Oct 31, 2016 by Andre Setiawan

1 Answer

0 votes
Hi Andre,

 

Could you please share your project with us at support@shephertz.com? It will help us to provide better support to you.

 

regards,

Himanshu Sharma
answered Nov 2, 2016 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...