Skip to main content

Callback of Player Network Login Module (AuthBaseResultObserver)

If you're using the Unity engine, see the AuthBaseResultObserver for the Unity SDK.

Register the callback for the Player Network login module; the game needs to handle the callback.For more information about the callback data structure, see BaseResult.

note

It is strongly recommended that games register during the application start-up function.

Function definition

C++ Event Handling Method (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 example

C++ Event Handling Method (Above V1.15)

// Configure callback
FINTLAuthBaseEvent authBaseEvent;
authBaseEvent.AddUObject(this&OnAuthBaseResult_Implementation);
UINTLSDKAPI::SetAuthBaseResultObserver(authBaseEvent);
// Clear callback
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);
}