Skip to Content
Mastering UI Development with Unity
book

Mastering UI Development with Unity

by Dr. Ashley Godbold
April 2018
Beginner content levelBeginner
468 pages
11h 7m
English
Packt Publishing
Content preview from Mastering UI Development with Unity

Flexible Width and Height

The Flexible Width and Flexible Height properties represent a percentage, where the percentage is the size of the child relative to the other children. Since these values are percentages, a value of 0 would represent 0% and a value of 1 would represent 100%.

As with the Preferred Width and Height, this setting doesn't work as expected unless the Child Force Expand property is deselected. In the following example, the two Panels and children have nearly identical settings. The only difference between the two is that the top parent Panel has the Child Force Expand Width property selected and the bottom parent Panel does not. So, you can see that the values set for Flexible Width of the children are ignored if Child ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

Jiadong Chen
Unity UI Cookbook

Unity UI Cookbook

Francesco Sapio

Publisher Resources

ISBN: 9781787125520Supplemental Content