Printing did not worked untill key was set -1


Just for the fellows trainee the example from course did not worked for me unfortunately. I found out that I need to change this line:

Engine->AddOnScreenDebugMessage(0, 2, FColor::Green, TEXT("Hosting"));

to this:

Engine->AddOnScreenDebugMessage(-1, 2, FColor::Green, TEXT("Hosting"));

For some reason using key 0 (first argument) did not show the message. Wonder why, if I will find out I will post answer here. Or maybe someone knows and can share with us?

I am using source build UE 4.19 engine.


Same issue here. From what I read, it’s a bug in 4.19 and has been submitted to be fixed. Links below

I can confirm that using key=0 works in 4.24.