Can't get widget to show in view

284381-capture2.png

284382-capture3.png

All images attached. Open Inventory Event is in My Player BP, Hierarchy from Character Inventory BP. I can’t get the widget to show in the view when I press tab. Tried an overlay already as well. Not sure what I did wrong.

It should work. Try printing out a string after creating the widget to see if the code is running. Have you tried with any other widgets?

It isn’t even running the code…it’s not printing the string. Also, all of my other widgets work

Hold on. Where is the custom event called?
You’re showing that tab key is you InputAction yet you use a custom event to open the inventory. Could this be the issue here? Use the one from screenshot and it should work.

284392-inputaction.png

So I was super excited because that was an absolute duh moment on my part…but then I got this error which honestly I have no idea what it means

This means that the variable CharacterInventory is null aka has not been set. Just remove that part or add is valid and then plug the widget reference to it. If it’s not valid create widget.

Okay…so I think (maybe?) I got it. When I deleted CharacterInventory I wasn’t able to pull up the inventory at all and even when using is valid. So I think maybe this might work-we will see in the long run I guess. (I’m still a beginner). So far I can pull up the inventory with this…Feel free to criticize!

Well you need some way to get your inventory reference, maybe cast to it?
By valid note I mean the other one, with question mark. :slight_smile:
Just remove the branch and it should bring up your inventory widget for sure.

If I could do the hand to face emoji here I definitely would haha. It works! Thank you so much!

No worries, you came to the right place to get help.

Hi!

In the branch you are checking for the widgets visibility BEFORE it is even created. That cannot work, the target is not valid yet.

Use an “is valid?” instead, to figure out if it already exists.
Or right click on the “Character inventory”-Reference and choose “Convert to Validated Get”, no return bool and branch necessary this way, a bit more elegant.

(Tip: If a widget is already created, you could use “Is in Viewport” (returns bool), but in this case not an option.)

Cheers!