CutoutInfoObserver
Register the callback of the Player Network SDK Notched Display module, the game needs to process the callback function. For more information on the callback data structure, see CutoutInfoResult.
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 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 sample
C++ event handling (above V1.15)
//configure callback
FINTLCutoutEvent cutoutEvent;
cutoutEvent.AddUObject(this, &OnCutoutResult_Implementation);
UINTLSDKAPI::SetCutoutResultObserver(cutoutEvent);
// Remove callbacks
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);
}