Initialization order of Widget vs Bindings #53
jdaignault
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We encountered an interesting scenario where we had the following setup:
Event Constructwas fetching aDynamic Materialfrom anImagewidget and cache it to a blueprint variableAs it turns out, when the binding executed for the first time, the cached variable turned out to be invalid. After poking around in
UUserWidget::NativeConstruct, it was observed thatExtension->Constructtakes place before the widget'sConstructblueprint event.This scenario was easily fixed by moving the event graph logic to
Event PreConstruct, but it raised a question about whether this initialization order seemed correct. Should bindings only try to initialize themselves only after widgets have 'fully initialized' themselves?All reactions