How can I determine how my custom UMG widget draws inside the editor?
I am creating a custom UMG widget that extends UUserWidget. It uses functions like UWidgetBlueprintLibrary::DrawLine and FSlateDrawElement::MakeText to draw custom content but renders with UUserWidget::NativePaint(FPaintContext& context).
This render call only appears to occur during run-time and not in the UMG blueprint editor. Where must I place my draw code for it to render in-editor?
asked Aug 24 '15 at 04:39 AM in C++ Programming
Each widget uses a slate widget to complete its drawing. An example of this can be seen in Image.h, where the image UWidget uses an SImage to draw its contents. All parameters are passed from the UWidget to the slate widget when the RebuildWidget() in the Image.h is called from the editor. This seems to either occur on load or on change of some widget parameters. The slate widget then calls draw functions for text, images etc.
Rendering code should be placed in the slate widget's OnPaint function.
answered Aug 30 '15 at 11:58 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here