How to call a function that's inside a UMG widget

Hello everyone, what I’m trying to do is call a function that’s inside my player’s HUD widget to change the visibility of one of the icons to show. What I’m trying to setup is have an NPC quest giver change the visibility of the icon when the quest is given to the player.

However when I try to call the function the only node I get is this:

76287-cast.png

This is what my MainHUD widget graph looks like:

I’m still new to UMG in general so I hope that I’m simply just missing something and that it’s not too hard to solve.

Thanks for any and all help!

You need to have a object refrence to call function on it, cast node is to change varable type of link not to get object.

First make object varable of you widget blueprint class then when you create a widget and add it to view port you surely use “Craete Widget” node same as shown here:

…which instantiate widget and return it refrence, set that refrence to varable you made and then from that varable you can call function inside your widget blueprints

You seem to missing basic knowledge about classes and object, here my tutorial which will open your eyes a little:

I found out the issue, for whatever reason Unreal was firing the UMG funciton every frame. I managed to figure it out once I discovered that weird issue.