unreal-engine4hud

Unreal - Create Widget in blueprint - fills the screen instead of keeping its dimensions


I use "Create Widget" -> "Add to viewport" to add one of my widgets to the viewport

the problem is that the widget fills the whole screen

I then added a canvas panel in my widget but then I cannot choose to anchor it to the bottom of the screen

how do I do this ?

thanks

enter image description here


Solution

  • One potential way of going about anchoring the widget to the bottom of the screen would be to make your canvas panel the size of your screen and set the position of the content of the widget individually and anchor it as shown below. Picture of a widget being anchored to the bottom right

    Another way you can go about doing this is by clicking on your size box, going to the details tab on the right, clicking on anchors and then the option shown below (3rd from top on the right most column), This will anchor your size box to the bottom of the screen. setting size box's anchor to bottom of screen

    Ill also link you to a discussion I found that might be useful to you for solving your issue.

    https://answers.unrealengine.com/questions/839144/dynamically-set-widget-position-on-canvas-panel.html

    Let me know if this solves your problem. If not I'll try my best to help you out in any way possible :)