ComplianceResultObserver
Registers the callback of the Player Network SDK compliance module, the game needs to process the callback function. For more information on the callback data structure, see ComplianceResult.
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 SetComplianceResultObserver(FINTLComplianceEvent& callback);
//get callback
FINTLComplianceEvent& GetComplianceResultObserver();
Unreal Engine event handling
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnComplianceResult(FINTLComplianceResult ret);
virtual void OnComplianceResult_Implementation(FINTLComplianceResult ret) {};
Code sample
C++ event handling (above V1.15)
//configure callback
FINTLComplianceEvent complianceEvent;
complianceEvent.AddUObject(this, &OnComplianceResult_Implementation);
UINTLSDKAPI::SetComplianceResultObserver(complianceEvent);
// Remove callbacks
UINTLSDKAPI::GetComplianceResultObserver().Clear();
void OnComplianceResult_Implementation(FINTLComplianceResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
Unreal Engine event handling
void OnComplianceResult_Implementation(FINTLComplianceResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}