[Request] Draw editor event for blueprints and native

I got it working. A couple extra tricks were necessary:

  1. In my project’s (projectname).Build.cs file, I had to add “UnrealEd” as a dependency. Otherwise, use of FComponentVisualizer would cause a linker error.

  2. I had to add a ADebugEnabledActor class that extends from AActor. All it has is a virtual DebugDraw function. My route data actor extends from ADebugEnabledActor instead of AActor so that my FDebugVisualizer ( which is registered to my UDebugVisualizerComponent ) can cast its owner to ADebugEnabledActor in DrawVisualization (otherwise the cast will fail) and call its DebugDraw function. Much more complicated than I was hoping, but it works! (if there is a way to simplify any of this, or do away with the extra inheritance please let me know)

  3. You can add something like this to automatically add the debug visualization plugin to your actors (might want to make it editor only or this extra data will end up in your shipped code. or do it later):

UDebugVisualizerComponent* DebugVisualizerComponent = ObjectInitializer.CreateDefaultSubobject(this, TEXT(“DebugVisualizer”));