Skip to main content

Guild Callback (GroupBaseResultObserver)

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

Register the callback for the Player Network SDK guild module; the game needs to register the callback for handling.For more about the callback data structure, see BaseResult.

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 SetGroupBaseResultObserver(FINTLGroupBaseEvent& callback);
//Get callback
FINTLGroupBaseEvent& GetGroupBaseResultObserver();

Unreal Engine Event Handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnGroupReqInfoResult(FINTLBaseResult ret);
virtual void OnGroupReqInfoResult_Implementation(FINTLBaseResult ret) {};

Code example

C++ Event Handling Method (Above V1.15)

//Set up callback
FINTLGroupBaseEvent groupBaseEvent;
groupBaseEvent.AddUObject(this, &OnGroupReqInfoResult_Implementation);
UINTLSDKAPI::SetGroupBaseResultObserver(groupBaseEvent);
//Clear callback
UINTLSDKAPI::GetGroupBaseResultObserver().Clear();
void OnGroupReqInfoResult_Implementation(FINTLBaseResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine Event Handling

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