- Home /
UI Layout Scaling middle Content
Hi,
I am trying to scale some content that is between to other UI elements. But can't seem to nail it.
The Top content is a level guide. The Bottom content is a button to start the game.
The middle content that I am trying to scale is a level preview.
The canvas in which these all the above elements are contained is using the Canvas Scaler to work on different screen sizes and orientation. It is using Expand for screen match mode.
Any ideas/suggestions?
Thanks
Answer by _dns_ · Jun 22, 2016 at 02:36 PM
Hi, there are some "Auto Layout" components for this kind of behaviors.
For your situation, I'd use a VerticalLayoutGroup on a parent object of the 3 objects you described. You'll also need to add a LayoutElement component on each of those objects. After playing with the different parameters of those components, you should be able to have the behavior you described :)