Callback for compliance information (ComplianceResultObserver)
Register the callback for the Player Network SDK compliance module. The game needs to register the callback for processing.For more information about the callback data structure, please see ComplianceResult.
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 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 example
C++ Event Handling Method (Above V1.15)
//Configure callback
FINTLComplianceEvent complianceEvent;
complianceEvent.AddUObject(this, &OnComplianceResult_Implementation);
UINTLSDKAPI::SetComplianceResultObserver(complianceEvent);
//Clear callback
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);
}