0

I'm trying to create a flexible menu for my mobile project but i'm having trouble with new UI system. I could do this with code but i want to know if it's possible without coding.

Here is what i'm trying to do: https://i.stack.imgur.com/4a4Me.jpg

Basically, i want to have a menu area with height of %10 of total screen height. So for example, if it's a HD device, i want height of the red area in the image to be 192 pixel (1920/10). I can do that easily but i also want to have 192x192 buttons aligned on top right corner. I can set the height to parent so it becomes 192 too but i can't set the width to height. I can use ratio fitter to make them squares but i can't place them side by side.

So basically i just want to set width of an element to it's height and puting them side by side without coding. Is it possible?

Thanks

  • have you tried using horizontal groups and layout element ? – mahdi mahzouni Dec 31 '15 at 19:30
  • @mahdimahzuni Yes, i did, it works but i can't place them side by side. – user3781428 Dec 31 '15 at 20:28
  • why not ? suppose we have a panel that have the horizontal layout component ,and all its children have layout element it should stack next to each other like the picture you posted and for squaring them you can use the layout element properties – mahdi mahzouni Dec 31 '15 at 21:02

1 Answers1

0

Have a panel inside Canvas, and add horizontal layout group and then add your buttons inside this panel.

Note : You will need to increase the width of the panel more than the canvas in order to have buttons horizontally.