Why can't I center my UMG widgets?

Hello,

I have set up a simple test in which I created a widget containing an image and set its position to the center of the screen inside of the level blueprint.

This is what my widget looks like. I have an image that I’ve set to 120x120. I’ve set its position to 0,0 and anchored it to the center. Then, I set the size of the Canvas Panel by changing Fill Screen to custom, and set it to the same size as my image to keep things neat.

After this, on my Level Blueprint’s Event Begin Play I create my widget, add it to the viewport and then set its position to be the viewport size divided by 2. This centered my widget to the center of the screen.

Feel free to ask any questions regarding the setup.

1 Like