Callback for the login module (IDTokenResultObserver)
Register the callback for the Player Network SDK login module; the game needs to handle the callback.For more information about the callback data structure, please refer to IDTokenResult.
note
It is strongly recommended that games register during the application start-up function.
Function definition
// Add INTLIDTokenResult callback
public static void AddIDTokenResultObserver(OnINTLResultHandler<INTLIDTokenResult> callback);
// Remove INTLIDTokenResult callback
public static void RemoveIDTokenResultObserver(OnINTLResultHandler<INTLIDTokenResult> callback);
Code sample
// Add callback
INTLAPI.AddIDTokenResultObserver(OnAuthIDTokenEvent);
// Remove callback
INTLAPI.RemoveIDTokenResultObserver(OnAuthIDTokenEvent);
// Handle callback
public void OnAuthIDTokenEvent(INTLIDTokenResult ret)
{
Debug.Log($"MethodID: {ret.MethodId}");
}