Widget variable in UMG returns None

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

I have an Overlay inside a canvas:

And I make the Overlay Widget a variable:


I followed the instructions in this thread to obtain the panning of an image inside a canvas panel, and it worked. Link: How to scale/zoom a widget with blueprints? - UE4 AnswerHub

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 ???