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.

72670-ui-puzzle.png

Any ideas/suggestions?

Thanks

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 :slight_smile: