GUI screen size (SOLVED)

Hey
Say I want my main menu to be in Portrait mode, but the rest of the game to be in landscape mode. Is that possible to achieve?

Do you mean to have the UI look like it is in a portrait layout while the device is in landscape orientation?

Left I’m assuming?

Use landscape layouts but position your GUI within it at the portrait style?

If I do it that way theres black spots on each side of the gui start menu though

Can you show picture of what you mean?

1 Like

I think they mean they want to change the supported display settings in runtime, displaying in portrait on the main menu and then switching to landscape once the actual game starts. I’m going to guess that’s not possible but the main menu UI could be manipulated to give the impression of portrait.

1 Like

@Pkeod Yes, this is exactly what I mean. We deigned a Portrait UI just for the main menu, the rest of the game is in landscape mode.

I’m still not sure I understand. The game should always be played in landscape mode? But the menu always in portrait mode?

1 Like

Start screen in portrait mode, the game and any other screen is in landscape

Hmm, ok, so you could probably do this using a custom render script and let the render script listen to a message that will change between rendering in landscape and portrait mode. You could also rotate a root game object or the root node of a gui scene to achieve this. By the way, how complex is the start screen?

1 Like

Its simple honestly. How would go about rotating?

If you use a gui component with a root box node and some children to build your start screen, then it is as simple as rotating the root node along the z-axel.

Before:

After:

1 Like

Thank you, thats perfect! Also seems I can set the template from landscape to portrait for that gui. Havent tested yet

1 Like