Unity App42API Callback variable respond

0 votes

Hello, I just started using App42API Cloud with Unity. I have created Register/Login system by example. When game starts there is a UI Login Panel pops up. Player will enter his/here email and password to authenticate. After successfully authentication I want disable UI Login Panel and enable Menu UI Panel. 3 days past I can't figure out how can I do that. 

As you can see in image class "MyCallBack" is not Monobehaviour and I can't get any access to him. I tried different method. 

I also tried to add Monobehaviour before App42CallBack. Like this:

public class MyCallBack : Monobehaviour, App42Callback




Nothing works. 

Please help need. Thanks

asked Mar 25, 2018 in Unity by Nurlan Akylbekov (20 points)

1 Answer

+1 vote

WORKED YAHOO))). I just looked into this script http://api.shephertz.com/tutorial/Unity-Caching-and-Offline-Storage/

and I understand something

public class MyCallBack : App42CallBack
    public bool isAuthenticated;
    Register register = GameObject.Find("_Scripts").GetComponent<Register>();
    public void OnSuccess (object response)
        User user = (User)response;
        Debug.Log("userName is " + user.GetUserName());             
        Debug.Log("emailId is " + user.GetEmail()); 
        register.isRegistered = true;
        register.authenticatePanel.gameObject.SetActive (false);
        register.menuPanel.gameObject.SetActive (true);

    public void OnException (Exception e)     
        Debug.Log("Exception : " + e);      


Thank you to all. Now I want to know, are there all functions works like that? I mean create Matchmaking, Search Player etc?

answered Mar 25, 2018 by Nurlan Akylbekov (20 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