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

Aspect Ratio Fitter

The Aspect Ratio Fitter component works similarly to the Layout Element component, as it allows overriding the size constraints being sent to it. It will force the UI object on which it is attached to resize based on an aspect ratio.

To add an Aspect Ratio Fitter component to a UI object, select Add Component | Layout | Aspect Ratio Fitter (Script) from within the object's Inspector. The Aspect Ratio Fitter component has the following properties:

The Aspect Ratio property is the aspect ratio that the Rect Transform will maintain. If you want to do an aspect ratio like 4:3, you can simply enter 4/3 in the box, and it will ...

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