x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I determine how my custom UMG widget draws inside the editor?

Hey Team,

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?

Cheers, Mugen

Product Version: UE 4.8
Tags:
more ▼

asked Aug 24 '15 at 04:39 AM in C++ Programming

avatar image

MugenCity
182 12 18 104

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Solution:

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.

more ▼

answered Aug 30 '15 at 11:58 PM

avatar image

MugenCity
182 12 18 104

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question