# \[UMG\] Object Reference = None when trying to read component from a characte

**URL:** <https://forums.unrealengine.com/t/umg-object-reference-none-when-trying-to-read-component-from-a-characte/446627>\
**Category:** UI\
**Tags:** object-reference, unreal-engine, UI, Components, Blueprint, question, UMG\
**Created:** [April 4, 2019, 7:05pm UTC](https://forums.unrealengine.com/t/umg-object-reference-none-when-trying-to-read-component-from-a-characte/446627 "2019-04-04T19:05:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JavierIslas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JavierIslas](https://forums.unrealengine.com/u/JavierIslas)\
**Post date:** [April 4, 2019, 7:05pm UTC](https://forums.unrealengine.com/t/umg-object-reference-none-when-trying-to-read-component-from-a-characte/446627/1 "2019-04-04T19:05:30Z")

</div>

Hello, everyone. I’m trying to build an inventory sistem for a game and to be honest, I have zero to none experience working on UMG and I’m finding an error with it. I got a Main widget that hold the inventory widget

 ![273313-inventory3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/1/8415022e2b4ba725cc22e3c3dd5472c152a08af7.png)

Inside this wg is a menu with the different actions you can do with an item on the inventory, this “action menu” is where the error locates

 ![273290-inventory0.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/a/39a94f28348a13de760d9c65fcb5c78da2f09ae8.png)

Here is the begin play event of the (for now) playerCharacter and the main wg has a variable that is a reference to the inventory component and you can see that it has a valid reference

 ![273311-inventory.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/0/8101c65857e13070ece996a2b0f186f672bbbeb4.png)

On the main wg constructor, I send the reference to the other 2 widgets of the inventory (the array firts and the action menu second) again a valid reference and the fact that I can visualize the inventoy (first image) means that the “inventario” object reference works and holds a reference to the correct component.

 ![273314-inventory5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/e/57e13158bd6ef8261139ba0b73175c8118bc1e71.png)

But every time I try to make the action menu appear, the variable “inventory” has no value, which does not make sense to me and I already lost 3 days trying to solve it.

If you got any idea on how to fix the error, thanks in advance.

---

<div class="post-metadata">

**Author:** ![99bullets](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@99bullets](https://forums.unrealengine.com/u/99bullets)\
**Post date:** [April 4, 2019, 8:18pm UTC](https://forums.unrealengine.com/t/umg-object-reference-none-when-trying-to-read-component-from-a-characte/446627/2 "2019-04-04T20:18:30Z")

</div>

i have same problem i posted lol

---

<div class="post-metadata">

**Author:** ![JavierIslas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JavierIslas](https://forums.unrealengine.com/u/JavierIslas)\
**Post date:** [April 6, 2019, 2:22am UTC](https://forums.unrealengine.com/t/umg-object-reference-none-when-trying-to-read-component-from-a-characte/446627/3 "2019-04-06T02:22:50Z")

</div>

So, okay. I managed to fix the problem, on a way that’s not too pretty, what I did was getting the component from the local playerController, on the action menu function, if any one know a better way to fix the problem, it will be appreciated.
