# User Widget Expose on spawn doesn´t work

**URL:** <https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 20, 2017, 8:53pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448 "2017-07-20T20:53:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![leofucci](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leofucci](https://forums.unrealengine.com/u/leofucci)\
**Post date:** [July 20, 2017, 8:53pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/1 "2017-07-20T20:53:45Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/3/623394fbb868c0535e78e74badd01bcda8860986.jpeg)

Am I doing something wrong or is this a bug?

---

<div class="post-metadata">

**Author:** ![leofucci](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leofucci](https://forums.unrealengine.com/u/leofucci)\
**Post date:** [December 6, 2018, 3:26pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/2 "2018-12-06T15:26:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gsteigert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gsteigert](https://forums.unrealengine.com/u/gsteigert)\
**Post date:** [August 27, 2019, 8:25pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/3 "2019-08-27T20:25:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheFlow3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFlow3k](https://forums.unrealengine.com/u/TheFlow3k)\
**Post date:** [September 24, 2020, 9:46am UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/4 "2020-09-24T09:46:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![LeFxPete](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeFxPete](https://forums.unrealengine.com/u/LeFxPete)\
**Post date:** [October 21, 2020, 10:44am UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/5 "2020-10-21T10:44:55Z")

</div>

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) .

---

<div class="post-metadata">

**Author:** ![AAcnirak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAcnirak](https://forums.unrealengine.com/u/AAcnirak)\
**Post date:** [November 9, 2021, 1:00pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/6 "2021-11-09T13:00:11Z")

</div>

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](https://gamedev.stackexchange.com/questions/192364/how-do-i-add-custom-data-to-a-listview-widget-in-unreal) [Listview - getting started in BP](https://forums.unrealengine.com/t/listview-getting-started-in-bp/123626)

---

<div class="post-metadata">

**Author:** ![Heigl\_KFP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/heigl_kfp/32/250867_2.png) [@Heigl\_KFP](https://forums.unrealengine.com/u/Heigl_KFP)\
**Post date:** [June 17, 2022, 10:29pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/7 "2022-06-17T22:29:53Z")

</div>

+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…

---

<div class="post-metadata">

**Author:** ![duyaokun](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/duyaokun/32/893361_2.png) [@duyaokun](https://forums.unrealengine.com/u/duyaokun)\
**Post date:** [December 28, 2023, 4:03am UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/9 "2023-12-28T04:03:50Z")

</div>

+1 Same issue in 4.27.2

---

<div class="post-metadata">

**Author:** ![Direct22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Direct22](https://forums.unrealengine.com/u/Direct22)\
**Post date:** [January 31, 2024, 3:08pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/10 "2024-01-31T15:08:41Z")

</div>

+1 Same issue in 5.3.2

---

<div class="post-metadata">

**Author:** ![raidercodebear](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@raidercodebear](https://forums.unrealengine.com/u/raidercodebear)\
**Post date:** [February 19, 2024, 3:15pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/11 "2024-02-19T15:15:34Z")

</div>

+1 5.3.2

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

---

<div class="post-metadata">

**Author:** ![tayble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tayble](https://forums.unrealengine.com/u/tayble)\
**Post date:** [August 5, 2024, 7:39am UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/12 "2024-08-05T07:39:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![macxike](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@macxike](https://forums.unrealengine.com/u/macxike)\
**Post date:** [January 15, 2025, 1:26am UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/13 "2025-01-15T01:26:10Z")

</div>

I realized if I use “Create and Add Widget” the ExposeOnSpawn doesn’t work, but if you use the “Create Widget” node it works. Hope this helps.

---

<div class="post-metadata">

**Author:** ![BOBtheROSS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BOBtheROSS](https://forums.unrealengine.com/u/BOBtheROSS)\
**Post date:** [July 16, 2025, 5:31pm UTC](https://forums.unrealengine.com/t/user-widget-expose-on-spawn-doesn-t-work/400448/14 "2025-07-16T17:31:12Z")

</div>

I’m on UE5.4/5.5  
For me the the exposed variables are the class default values when **OnInitialized** executes,  
but are correct when **PreConstruct** executes

**OnInitialized** only executes once (you have to add the node yourself in the graph)  
**PreConstruct** and **Construct** execute every time the widget is added to the Viewport or a Panel widget (Canvas Panel, Overlay, Horizontal Box, …)

Some oddities:  
If I use the **ConstructObject** node to create the widget, the **OnInitialized** event is not executed  
If I use the **CreateWidget** node the **OnInitialized** is executed  
If I use the **CreateWidget** node and execute **AddToViewport** in the widget on the **OnInitialized** , the **OnInitializedwill** be called twice in this order: Init, PreConstr, Constr, Init, [continues behind the CreateWidget node]

@macxike what do you mean by “Create and Add Widget”? Is that a single node?
