Vertical HUD panels with square view

I wasn’t getting any responses on my other thread about this from a couple of weeks ago. I know that double-posting is generally a “no-no”, but I figure I may have posted in the wrong forum the first time.

Anyways…

I need to have two vertical UI panels; one on each side of the screen. Their height needs to scale to the height of the screen, and the width needs to scale in such a way that the space between them (the actual game view) is perfectly square. I’ve worked with UI components before, but it’s always been a struggle for me, so I’m looking for some pointers on how to set this up so that the UI components on each vertical panel aren’t all messed up at different screen sizes.

Any suggestions for how to get started would be greatly appreciated.

Hello! Before we get to an answer, just making sure you’re using UI Toolkit because Unity has 2 UI systems for games right now (UI Toolkit and UGUI) and the answers would be very different!

So are you using the Canvas component? Or do you have UXML/USS files and a PanelSettings?

I’m using the Canvas component. I didn’t even know there was an alternative. Hah

I’ve transferred this post to the UGUI Forum, let’s see if someone can help you here :sunglasses:

1 Like