Skip to Content
Unity 2017 Mobile Game Development
book

Unity 2017 Mobile Game Development

by John P. Doran
November 2017
Beginner to intermediate content levelBeginner to intermediate
360 pages
6h 40m
English
Packt Publishing
Content preview from Unity 2017 Mobile Game Development

Anchors

Found inside the Rect Transform component, anchors give you the ability to hold on to a corner or part of the canvas so that if the canvas were to move and/or change, the pieces of the UI will stay in an appropriate place. These specify the edges of your element using a percentage of your parent's size. For example, if we set the Min X property to 0, the UI element would stick to the left edge of its parent.

The properties above the anchors are your position relative to the anchor that has been set. This can be quite useful when it comes to things such as supporting multiple resolutions without scaling the art assets created. In our case, we will want to have our title position itself relative to the top of the camera:

  1. Click on the ...
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

Holistic Mobile Game Development with Unity

Holistic Mobile Game Development with Unity

Penny de Byl
Hands-On Unity 2020 Game Development

Hands-On Unity 2020 Game Development

Nicolas Alejandro Borromeo

Publisher Resources

ISBN: 9781787288713Supplemental Content