Accessed none from UMG variable?

If you create a widget, add to viewport, then use the return value to set it to a user widget, shouldn’t it work?

I have a door that when you reach near it you get a “o to open door” and its meant to get hidden when you enter the door. However I try to set visibility and link the target to my variable that has the user widget on it and it doesn’t work, it returns none.

If I try to connect the return value to set visibility, it still returns none.

If I try to use a “doorumg” type of variable, it also not works.

How to you properly set a variable to the UMG you add to viewport so that you can access it’s properties from any blueprint you add it to? So confused!!!

Here’s an example that works for me of adding a widget to the viewport and storing its reference.

This example runs in the player controller blueprint. You could do something similar in other blueprints as long as you set the Owning Player parameter of the CreateWidget node to a player controller instance.

I hope this is helpful to you.

Thank you very much! :smiley: