Skip to main content

AuthAccountResultObserver

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

Registers the callback of the Player Network SDK custom account module, the game needs to process the callback function. For more information on the callback data structure, see AccountResult.

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 SetAccountResultObserver(FINTLAccountEvent& callback);
//get callback
FINTLAccountEvent& GetAccountResultObserver();

Unreal Engine event handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnAccountResult(FINTLAccountResult ret);
virtual void OnAccountResult_Implementation(FINTLAccountResult ret) {};

Code sample

C++ event handling (above V1.15)

//configure callback
FINTLAccountEvent accountEvent;
accountEvent.AddUObject(this, &OnAccountResult_Implementation);
UINTLSDKAPI::SetAccountResultObserver(accountEvent);
// Remove callbacks
UINTLSDKAPI::GetAccountResultObserver().Clear();
void OnAccountResult_Implementation(FINTLAccountResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine event handling

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