How to draw debug strings in editor viewport at design time?

Basically what the title says. I want the functionality of the Draw Debug String blueprint node, but I want to be able see the strings in the editor viewport when the game is not running.

For example, say I had a blueprint MyBPActor, inside of which are two Arrow components.

I want to be able to drop an instance of MyBPActor into the world, and display a debug string label (“Arrow 1” “Arrow 2” etc) at each Arrow component’s location.

What I want is achievable at runtime using Draw Debug String, but I want to be able to see it in the editor viewport during design time as well (presumably via the construction script), and I can’t find anything on this.

I found this tutorial might help.

I have tested it, it worked fine for other Draw Debugs, but not Draw Debug String. Not sure if I missed something?


image


Edit:
I checked the source code and found something. Draw Debug String need iterate through the player controller list. So I guess it can’t get PlayerController when the game is not running?

2 Likes