# Can't communicate with widget component

**URL:** <https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852>\
**Category:** UI\
**Tags:** variables-communicat, unreal-engine, Widget, Blueprint, question, UMG\
**Created:** [February 13, 2015, 2:01pm UTC](https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852 "2015-02-13T14:01:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Measuring](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Measuring](https://forums.unrealengine.com/u/Measuring)\
**Post date:** [February 13, 2015, 2:01pm UTC](https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852/1 "2015-02-13T14:01:24Z")

</div>

Hello! I am experiencing problems when trying to create a inventory system with UMG.

I’m trying to put the widget as a component in my player character blueprint. The reason why I don’t just add it to viewport is because I want it to be in 3D space, to work with the stereoscopic view of the Oculus Rift.  
Somehow when I drag of the widget component pin in my event graph and search for the variables in the widget class, I can’t find then… It does however work when I use a create widget node in my graph editor instead of the widget component. From that one I can reference variables. I tried everything I know of and I can’t seem to get it to work…

Any help will be greatly appreciated!  
//Edvin

---

<div class="post-metadata">

**Author:** ![xenlock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xenlock](https://forums.unrealengine.com/u/xenlock)\
**Post date:** [February 27, 2015, 11:41pm UTC](https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852/2 "2015-02-27T23:41:58Z")

</div>

Just came across this question and wanted to tell you that to do this, you need to call ‘GetUserWidgetObject’ on your widget component reference first. That will give you a reference to the actual widget (which you need to further cast to your Widget class) and you can then access variables/functions there,

---

<div class="post-metadata">

**Author:** ![Measuring](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Measuring](https://forums.unrealengine.com/u/Measuring)\
**Post date:** [March 1, 2015, 11:30am UTC](https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852/3 "2015-03-01T11:30:11Z")

</div>

Hello! At first I did just that and it simply wouldn’t work. Then after a long while it did start to work haha. But thank you for the answer!

---

<div class="post-metadata">

**Author:** ![Todd.Vance](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Todd.Vance](https://forums.unrealengine.com/u/Todd.Vance)\
**Post date:** [May 12, 2018, 3:34am UTC](https://forums.unrealengine.com/t/cant-communicate-with-widget-component/306852/4 "2018-05-12T03:34:48Z")

</div>

I’ll add, I just had this issue. It doesn’t work in the construction script, but you can put it after “Begin Play”. Apparently GetUserWidgetObject is marked unsafe for construction scripts.
