Skip to main content

AuthBaseResultObserver

If you were looking for the method for use with Unity, see AuthBaseResultObserver for Unity SDK.

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 BaseResult.

note

It is strongly recommended to perform registration in the startup function of the game application.

Function definition

C++ event handling (above V1.15)

//configure callback
void SetAuthBaseResultObserver(FINTLAuthBaseEvent& callback);
//get callback
FINTLAuthBaseEvent& GetAuthBaseResultObserver();

Unreal Engine event handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnAuthResult(FINTLAuthResult ret);
virtual void OnAuthBaseResult_Implementation(FINTLAuthResult ret) {};

Code sample

C++ event handling (above V1.15)

//configure callback
FINTLAuthBaseEvent authBaseEvent;
authBaseEvent.AddUObject(this, &OnAuthBaseResult_Implementation);
UINTLSDKAPI::SetAuthBaseResultObserver(authBaseEvent);
// Remove callbacks
UINTLSDKAPI::GetAuthBaseResultObserver().Clear();
void OnAuthBaseResult_Implementation(FINTLAuthBaseResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine event handling

void OnAuthBaseResult_Implementation(FINTLAuthBaseResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}