IDTokenResultObserver
Registers the callback of the Player Network SDK Auth module, the game needs to process the callback function. For more information on the callback data structure, see IDTokenResult.
note
It is strongly recommended to perform registration in the startup function of the game application.
Function definition
// Add the INTLIDTokenResult callback to process callback
public static void AddIDTokenResultObserver(OnINTLResultHandler<INTLIDTokenResult> callback);
// Remove the INTLIDTokenResult callback
public static void RemoveIDTokenResultObserver(OnINTLResultHandler<INTLIDTokenResult> callback);
Code sample
// Add callbacks
INTLAPI.AddIDTokenResultObserver(OnAuthIDTokenEvent);
// Remove callbacks
INTLAPI.RemoveIDTokenResultObserver(OnAuthIDTokenEvent);
// Process the INTLIDTokenResult callback
public void OnAuthIDTokenEvent(INTLIDTokenResult ret)
{
Debug.Log($"MethodID: {ret.MethodId}");
}