Menu Widget Problem

Hi All,

I’ve got a problem with a widget I’m using for a menu.

The menu needs to be a certain size (1080x1500) but it keeps resizing automatically to ()1080x1980), how do I stop this?

Hey @Delta1,

Can you share any more information or screen shots about how your widget is set up? Do you have your menu on a canvas, or nested in any grid slots or boxes? When you say menu, are you referring to a single UI element or a collection of elements?

With a little more information we can start troubleshooting this issue.

1 Like

Hi Caesar,

the menu is on a canvas, I dont think its in any grid slots or boxes (admittedly I don’t know what these are).

I suppose its a single UI element (a menu) that features a few buttons to launch specific maps.

I’ve attached a screenshot of the element hierarchy and details for the canvas object itself.

I’d really appreciate your help


Hey @Delta1,

While the way you have set this up will allow you to see and use the buttons, they will likely as you are finding take up the entire screen, especially with an image directly on the canvas panel. Grid slots and vertical or horizontal boxes allow you to lay out how the menu will look on screen space, as well as ensure scaling for different screen resolutions.

Take a look at this official documentation on creating a main menu. You don’t have to do things exactly as they are shown here, though it may help to go through the motions a time or two.

If your issue is specifically that the image is oversized, consider nesting it in a size box or a scale box. I personally prefer scale boxes for UI elements as they ensure that your UI will scale to different target resolutions, but if that is not needed you can use a size box to set a static size. This is covered briefly in the documentation I listed.

I hope this information helps, and good luck!

1 Like

Would a size box go straight on top of the canvas?

Additionally when the maps load from this menu, will they need to be resized independently or will they load in their standard sizes 1920x1080?

I’ve put the sizebox on top and given it the size of the image, but the buttons for the UI dont show and I can only see a portion of the screen?

Also when the map loads I can only see half of the menu and the rest is the map, I only want to see the menu and nothing else?

What am I doing wrong Caesar?

Hey @Delta1,

You need to change the Z order of the buttons to be higher than the image so they will display over the image. As for the sizing issue, if you only want to see the image and nothing else on the screen, set your anchoring point to screen fill. If you want to be able to see around the edges, that’s where boxes come in. When you say maps are loaded from this menu, are you referring to game levels or images of maps? Either way, changing the resolution of UI elements here should not change other assets being loaded.

The Z order issue is listed in the documentation I posted, as well as how to size a background image. I am having a hard time trying to visualize what exactly this menu looks like or how you would like it laid out. At the bottom of the documentation listed above, there is a video showing how the menu turns out at the end of the procedure listed. Is that roughly what you are going for?

I look forward to hearing from you!

hi Caesar,

This is the problem how do I resize the canvas to the size of the Image rather than the other way around?

I’ve tried all the anchors and none of them help unfortunately, I think the issue is with the canvas itself as its landscape and the image I need in there is portrait?

I’d really appreciate your help

Actually you’re right the image does need to be rescaled down to fit in the 1920x1080 otherwise it won’t display properly on a users machine.

Can the scale box do this for me so I don’t have to mess about with an image editor?

Mind you we still have a problem with the menu not centring correctly and the level being visible in the background, if we use the anchor setting to display whole screen it gets stretched out horribly.

Sorry for being a pain but I’d appreciate some wisdom!

Ok nearly there now, got everything working, however I can’t get the widget to terminate the map cleanly when I press the quit button.

Currently it momentarily shows the map before it quits, how can I stop this, ie I’d like the widget to kill the map instantly?

Additionally when I play the menu level it won’t play full screen and only plays in the editor which is annoying, how do I remedy this?

To make it even more frustrating I’ve accidentally hit launch and once cancelled, None of the levels that the menu opens can be played, what’s going wrong?

Please help going mad!