// ... or use inline lambda functions ViewportSubsystem->AddDisplayDelegate({ // Some kind of state management OutText = NSLOCTEXT("FooNamespace", "Blarg", "Display message here"); OutColor = FLinearColor::Red; return bShouldDisplay; }); }