Download

Best practices for using debug helpers in editor?

Hello! I’m currently cutting my teeth on learning how to more officially script editor utilities beyond shoving a lot of stuff into the constructor script. My current needs require using a lot of debug helpers to show where items would be on a distance along a spline. This is to try to remove the use of child actors (prior solution) and make it so actors are spawned and loaded with an editor utility widget, with a quick and dirty preview in the editor.

To my very limited knowledge, there is no clean way to script this by default. You either have to flush persistent debug lines at the start of the construction script and enable/disable the construction script running on dragging of actors and set a long draw duration, or mess with various modifications to create an “editor tick” essentially.

Thankfully, I stumbled upon Sondre Utheim’s blog posts where he talks about these issues in greater depth than I could.

https://sondreutheim.com/post/ue4_component_visualizers

I’ll likely implement this, but I am curious if there is any formal Epic methodology on this I am just missing, or if others may be interested in a change/rewrite to the debug visualization system to work better in the editor viewport/outside of game and what their current solutions may be.