if (UViewportStatsSubsystem* ViewportSubsystem = GetWorld()->GetSubsystem()) { // Bind a member function delegate to the subsystem... FViewportDisplayCallback Callback; Callback.BindDynamic(this, &UCustomClass::DisplayViewportMessage); ViewportSubsystem->AddDisplayDelegate(Callback);