You are getting this exception because, UnityCallback is not defined anywhere in your project, UnityCallback is a class, you can make your own class with "XYZ" name, this doesn't matters.
Just Follow these steps :-
1. Make a new class and name it whatever you want, lets say "UnityCallback".
2. Inherit this class from App42CallBack. Like :-
public class UnityCallback : App42CallBack
{
}
3. Now you are getting an error ,
"UnityCallback does not implement interface member `com.shephertz.app42.paas.sdk.csharp.App42CallBack.OnSuccess(object)"
"UnityCallback does not implement interface member com.shephertz.app42.paas.sdk.csharp.App42CallBack.OnException(System.Exception)".
4. So, implement the unImplemented members, Like this:-
public class UnityCallback : App42CallBack
{
public void OnSuccess (object response)
{
Debug.Log("Json Response Is :: " + response);
}
public void OnException (Exception ex)
{
Debug.Log("Exception Is :: " + ex);
}
}
5. Now you can call the method "userService.Authenticate(userName, password, new UnityCallback());", from your UsersLogin class, and you'll get the response OR exception in OnSuccess() and OnException() methods of UnityCallback class.
Like this :-
public class UnityCallback : App42CallBack
{
public void OnSuccess (object response)
{
Debug.Log("Json Response Is :: " + response);
if (response is User)
{
User userObj = (User)response ; // casting the json response to User Object.
Debug.Log ("UserName : " + userObj.GetUserName());
PlayerPrefs.SetString("userName", userObj.GetUserName());
Debug.Log ("EmailId : " + userObj.GetEmail())
}
}
public void OnException (Exception ex)
{
App42Exception exception = (App42Exception)ex;
Debug.Log("Exception Is :: " + exception );
}
}
You can check response classes(e.g UserResponse, StorageResponse, BuddyResponse etc) in SDK sample.
They all are behaving like UnityCallback.