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"

Create Widget bug, Construct not working if not Added to Viewport

on beginplay create a widget, the widget has an Add to Array on the construct. if i dont do a add to viewport and instantly remove from parent the add to array never executes, its like if it needs to be "activated" by adding it to the viewport (using Set Input Mode Game and UI worked too). Tested using a dummy Print String "Hello", doesnt displays anything either, but if i set the Add to Viewport, it shows the string inmediatly after Widget Creation.

alt text

Product Version: UE 4.11
Tags:
widgetbug.jpg (699.5 kB)
more ▼

asked May 27 '16 at 04:13 AM in Using UE4

avatar image

jblaswu
813 22 11 46

avatar image Xosh project May 27 '16 at 08:38 AM

From what I know it's imperative to add to viewport, I think if you want to keep this structure, you'll need to create «text» when we press C.

But I think it's would be a nice feature to add. So we can set whatever Widget and add it to viewport when we want.

avatar image jblaswu May 29 '16 at 01:28 AM

Just bumping this and adding that it only fails when the construct has an array instruction, regular instructions works fine.

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

2 answers: sort voted first

fixed in 4.12

more ▼

answered Jun 02 '16 at 06:55 PM

avatar image

jblaswu
813 22 11 46

avatar image eozgonul Jun 12 '16 at 07:30 PM

This bug still exists on 4.12, just to let you know.

avatar image jblaswu Jun 12 '16 at 09:14 PM

thats weird because my original issue was fixed on 4.12.1 (or preview) and its broken again on 4.12.2. i didnt notice it broke again because i decided to keep the workaround (custom event after create widget) to avoid exactly this....

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

I think this is back in 4.19, can anyone verify? I'm experiencing something very similar.

more ▼

answered Feb 02 '18 at 09:35 PM

avatar image

SDRLabs
16 3 4 7

avatar image MostHost LA Feb 18 '19 at 02:47 PM

Running into it on current. 4.21.2 Really annoying.

In the end it's a matter of copy/pasting code from the widget construct to the parent blueprint - it's just really not code effective, "proper", and i'm blowing a gasket to think about it in the incorrect terms it's in.

The "event construct" is supposed to happen when the event is created, not when the event is added to X... that's instantiation vs construction... OOP 101 if not even remedial.

The same happens with Pre Construct or On Initialized. looks like i'm SOL in terms of creating a recursive widget without creating my own event... On the plus side, I guess it'll work better with a custom event.

avatar image MostHost LA Feb 18 '19 at 02:47 PM

Actually Even more puzzling.

Creating Breaks and iterating through the code shows that the events are call as one would expect, on construct.

Yet the variables are all set to "NULL" even though the parent creating the item is customizing the variable.

then the same code gets run AGAIN once the event is added to the view-port.

At this point I think maybe it's my exec sequence on the print that's out of whack rather then the engine bugging out. It can't be running the same event initialized twice... that's just too big an oversight.

(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