Callback from Player Network SDK Self-built Account Module (AuthAccountResultObserver)
Register the callback for the Player Network SDK self-built account module; the game needs to handle the callback accordingly.For more information about the callback data structure, please refer to AccountResult.
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 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 example
C++ Event Handling Method (Above V1.15)
//Configure callback
FINTLAccountEvent accountEvent;
accountEvent.AddUObject(this, &OnAccountResult_Implementation);
UINTLSDKAPI::SetAccountResultObserver(accountEvent);
//Clear callback
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);
}