What's the code for "print string" node in bp?

In blueprints, we can easily use the node “print string” for debugging purposes. I wonder how to represent this node in code?

Thanks,

wcl

Thanks ! That’s all I want to know, and I appreciate that.

BTW, cmd line seems popular but I seldom use it. Can I typically achieve the same goal using the editor instead of the cmd line?

Most nodes you see are C++ function bindings, so search same name in API refrence:

In C++ you got whole log system in disposal:

I recommand you to use it as it places stuff in log file so in case of crash you can check what was happening. You can view log in runtime using Window->Devlopment Tools->Output Log or by starting UE4 application (this includes editor) with -log option in command line.

If you dont want to deal with setting up log categoories and such as writen in docs i gave, you can use this GLog->Log("bla bla bla"); quicker without those setups

Well you can display text anywhere and you can use that PrintString or AddOnScreenDebugMessage it will show it like Print String node

For the print string node you would most likely want to use the AddOnScreenDebugMessage function.

Docs: UEngine::AddOnScreenDebugMessage | Unreal Engine Documentation

Example:
void AddOnScreenDebugMessage
(
    -1, (always on top)
    2.f, (Display for two seconds)
    FColor::Green,
    TEXT("This is an example message!")
)

Thank you Papa Beans! I think I got that.