xxxxxxxxxx
//For plain text
if(GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Some debug message!"));
//for text + variables/values
if(GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, FString::Printf(TEXT("World delta for current frame equals %f"), GetWorld()->TimeSeconds));
//https://forums.unrealengine.com/t/print-to-screen-using-c/357351/2