User Widget Expose on spawn doesn´t work

Hi.

This is a bug that I can see since a long time ago.

I have a UserWidget, with a custom property marked as “Expose on spawn” and “editable”

Here you can see i´m adding pawn (current player) reference, so it´s impossible to have it empty, as he is the one creating the widget.

Intermediately created, if you try to read property “Heroe Base Actual” will be null… it´s like exposed on spawn fields are not took in consideration, but just for user widgets, for blueprints work ok.

Also, If I set SELF as a second step using the ReturnValue.HeroeBaseActual = self, it works ok, it just fails while using it on expose on spawn.

202838-exposeonspawn.jpg

Am I doing something wrong or is this a bug?

Checking my old questions, I can see this is already solved in the engine, it was a bug indeed.

I’ve just came across this bug on UE 4.22.3. Still not fixed.

Tested today 09.2020 in 4.25, still not getting “Expose on spawn” properties passed to widget. Bug still exists after years or i am doing something wrong?

Can confirm. Still some weird/undefined behaviour when trying to use “Expose On Spawn”-set variables inside the Construction Script of a widget. Sometimes it actually seems to work, and then it starts failing again without touching it (e.g. after restarting the engine/editor) .

We have encountered this problem when a coworker misused the listview widget, so there is a chance that you may still observe this problem if listview items were set in the wrong way. Listview never uses a user-created widget, it gets an object and it creates its widget itself. these links may be helpful about how to use listview in Unreal. blueprints - How do I add custom data to a ListView widget in Unreal? - Game Development Stack Exchange Listview - getting started in BP

2 Likes

+1 Same issue in 4.25.4

Exposed on Spawn Variable won’t be accessible in event “On Initialized”. Adding a 1 frame delay solves the issue, but then other functionality needs a 2 frames delay and this scales up…

1 Like

+1 Same issue in 4.27.2

+1 Same issue in 5.3.2

+1 5.3.2

unable to get spawn parameters in ‘Event On Initialized’.

Am I crazy or does this still not work. On 5.4.2