NoticeResultObserver
Register the callback of the Player Network SDK notice module, to be processed by the game. For more information on the callback data structure, see NoticeResult.
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 SetNoticeResultObserver(FINTLNoticeEvent& callback);
//get callback
FINTLNoticeEvent& GetNoticeResultObserver();
Unreal Engine event handling
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnNoticeResult(FINTLNoticeResult ret);
virtual void OnNoticeRequestData_Implementation(FINTLNoticeResult ret) {};
Code sample
C++ event handling (above V1.15)
//configure callback
FINTLNoticeEvent noticeEvent;
noticeEvent.AddUObject(this, &OnNoticeRequestData_Implementation);
UINTLSDKAPI::SetNoticeResultObserver(noticeEvent);
// Remove callbacks
UINTLSDKAPI::GetNoticeResultObserver().Clear();
void OnNoticeRequestData_Implementation(FINTLNoticeResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
Unreal Engine event handling
void OnNoticeRequestData_Implementation(FINTLNoticeResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}