Can DrawDebugString be used in Construction script

Is there a way to get visible DebugString in editor mode (before pressing play button). Unlike DrawDebugLine, for example, DrawDebugString only shown if game is started.

My plan is to use it to display some textual debug info on actors when editing a level. For that i’ve put DrawDebugString in construction script. I would like to avoid using TextRender component. Am i using wrong function for this? Is there a better solution?

1 Like

Debug nodes only work during run time.

Perhaps you could create a component with text render and a bit of handling functionality. You can very easily add/remove it to/from any actor without fiddling with just text render all the time.

Give it a go and see if it works out for you.

Thanks for reply

Debug nodes only work during run time.

Not really. DrawDebug[Line|Arrow|Sphere|and probably others] working in construction script for me.

a component with text render

a nice feature that drawDebugString has and textRender doesn’t is that it is 2d and thus “camera facing” all the time. For text render in runtime it’s possible to write little scrip that would make it face the right way, but for editor mode i’m not sure that even possible to determine where camera is located at the moment. Do you know how to do that?

Sorry about the confusion. You’re right, of course.

The view in the edit mode not really controlled by and object blueprints have access to as far as I know. You’d most likely need to access the last rendered frame and pull it out of there.

Saying that, I can see it being a really nifty feature.