Skip to main content

Callback for compliance information (ComplianceResultObserver)

If you are using the Unity engine, please see Unity SDK's 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);
}