void UBackendGameinstance::getNotifications()
{
FOnReceivedNotification NotificationReceivedDelegate;
NotificationReceivedDelegate.AddDynamic(this, &UBackendGameinstance::OnReceivedNotification);
rtClient->NotificationReceived = NotificationReceivedDelegate;
rtClient->SetListenerNotificationsCallback();
}
void UBackendGameinstance::OnReceivedNotification(const FNakamaNotificationList& NotificationList)
{
UE_LOG(LogTemp, Log, TEXT(“Notification Received number!: %s”), NotificationList.Notifications.Num());
for (int16 i = 0; i < NotificationList.Notifications.Num(); i++)
{
FNakamaNotification Notification = NotificationList.Notifications[i];
UE_LOG(LogTemp, Log, TEXT(“Notification Received!: %s”), *Notification.Content);
/*notificationsList[i] = Notification.Content;
UE_LOG(LogTemp, Log, TEXT("Notification Received!: %s"), *notificationsList[i]);*/
}
//this->getnotification.Broadcast();
}
This above Function is, I’m used for receiving notification as per the Listener, but it’s not Receiving ,when i try to send the notification from another client.
This blueprint I’m used for calling this function in period of time.
but it’s not logging anything in the c++ delegate function of receiver.
It’s only logging in the bleuprint logs.