Widget variable in UMG returns None

Hi,
I have a very simple setup which is returning a very strange error.

I have an Overlay inside a canvas:
image

And I make the Overlay Widget a variable:

image

I followed the instructions in this thread to obtain the panning of an image inside a canvas panel, and it worked. Link: https://answers.unrealengine.com/questions/815202/how-to-scalezoom-a-widget-with-blueprints.html

Now I’d like to turn this setup into a more complex structure: I’m trying to pan around an overlay, so I can add child widgets to it, for example buttons.

In the “OnMouseMove” overridden function I have this:

As you can see I’m trying to Set the RenderTranslation of the Overlay widget.
This works perfectly when the Widget is an Image.
When I use the Overlay I get this error:

It clearly shows that there is nothing stored in the Overlay variable.
How is this possible?

Thanks! :slight_smile:

Ok, after hours of headaches, I understood what was the problem.
I added the Widget to another Widget (the player UI) and for some reason the variables get emptied, causing the NullPointers.
I will then add the Widget to the viewport from the GameUI as a standalone.
It’s quite bad however that when a widget gets added to another one, it becomes such a mess.

clearly a bug, I have the same issue duplicating a widget
although I removed the size box and readded it
wtf umg ???

i had a same problem too.
but it’s solved simply.

just delete and re-paste UI which is none-accessible in editor.
캡처