Skip to main content

Asynchronous cutout screen information retrieval interface callback (CutoutInfoObserver)

If you are using the Unity engine, see Unity SDK's CutoutInfoObserver.

The callback for the asynchronous cutout screen information retrieval interface; the game needs to register a callback to handle it.For more about the callback data structure, see CutoutInfoResult.

note

It is strongly recommended that games register during the application start-up function.

Function definition

C++ Event Handling Method (v1.15 and above)

// Configure callback
void SetCutoutInfoObserver(FINTLCutoutEvent& callback);
// Get callback
FINTLCutoutEvent& GetCutoutInfoObserver();

Unreal Engine Event Handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnCutoutResult(FCutoutInfoResult ret);
virtual void OnCutoutResult_Implementation(FCutoutInfoResult ret) {};

Code example

C++ Event Handling Method (v1.15 and above)

// Configure callback
FINTLCutoutEvent cutoutEvent;
cutoutEvent.AddUObject(this, &OnCutoutResult_Implementation);
UINTLSDKAPI::SetCutoutResultObserver(cutoutEvent);
// Clear callback
UINTLSDKAPI::GetCutoutResultObserver().Clear();
void OnCutoutResult_Implementation(FCutoutInfoResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine Event Handling

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