Printing did not worked untill key was set -1

Hello!

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.

2 Likes

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

https://github.com/EpicGames/UnrealEngine/pull/4675

https://answers.unrealengine.com/questions/770367/addonscreendebugmessage-only-works-with-key-1.html

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

Privacy & Terms