# Widget Variable reference not valid after packaging

**URL:** <https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764>\
**Category:** UI\
**Tags:** packing, reference, unreal-engine, Widget, question\
**Created:** [July 28, 2020, 1:53am UTC](https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764 "2020-07-28T01:53:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darkforce259](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darkforce259](https://forums.unrealengine.com/u/Darkforce259)\
**Post date:** [July 28, 2020, 1:53am UTC](https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764/1 "2020-07-28T01:53:02Z")

</div>

I have an event in a widget blueprint that gets called and works perfectly when im in the editor. But when I run the game after packaging it, the event fails to call it.

In interact.png you can see the print statements I have, I get aboutToCallEvenet then aintValid on packaged game. But Valid when playing in editor. On each begin play in my game mode, i create all the UIs and save them to a variable. On begin play in my player character class, I store a reference to the variable in the game mode. Its this reference thats not working.

Any idea why this would work in editor but not when I’ve packaged everything?

---

<div class="post-metadata">

**Author:** ![Darkforce259](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darkforce259](https://forums.unrealengine.com/u/Darkforce259)\
**Post date:** [July 28, 2020, 2:23am UTC](https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764/2 "2020-07-28T02:23:35Z")

</div>

So I was able to solve this by saving a reference to the game mode and doing a get call on that. Why this works on packaged I have no idea

---

<div class="post-metadata">

**Author:** ![Byacca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Byacca](https://forums.unrealengine.com/u/Byacca)\
**Post date:** [July 30, 2020, 3:28pm UTC](https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764/3 "2020-07-30T15:28:33Z")

</div>

Are you doing this “get” call in your character?

---

<div class="post-metadata">

**Author:** ![Darkforce259](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darkforce259](https://forums.unrealengine.com/u/Darkforce259)\
**Post date:** [September 12, 2020, 5:12am UTC](https://forums.unrealengine.com/t/widget-variable-reference-not-valid-after-packaging/468764/4 "2020-09-12T05:12:41Z")

</div>

Sorry for the late reply lol, yea I was doing the get call on the character.
