Join Jesse Freeman for an in-depth discussion in this video Understanding anchors, part of Unity 5: UI.
- So let's say we want this button…to always be aligned at the bottom of our screen,…no matter what the resolution is.…Here we can use the anchors…in order to make that happen.…If we open up the Anchor Presets,…we can select the Bottom Aligned option.…Once you click on this, our element…will now be bottom aligned.…But Unity does something special.…It wants to retain the same position…as it had before you changed the anchors.…So now if you look at the position Y…of our Rec Transform, you'll see that it's 316.…
If we were to change this to 0,…it would now be bottom aligned.…Now our button's going to be a little hard to see,…simply because, not only is it bottom aligned,…but our Pivot is set to the middle.…So it will align the center point of the button…at the very bottom of our canvas.…If we go back into our button,…and try to align it to the top,…you'll see again the Y position has shifted…and now it is - 631.…
If we were to hold down the Option key on Mac,…or Alt on PC, you'll see that the icons now change…inside of the Anchor Presets.…
- Adding new components to the Canvas
- Working with RectTransforms
- Nesting UI elements
- Adding rich text and effects to the UI
- Creating images
- Styling UI buttons
- Handling input
- Creating sliders
- Controlling the layout of the screen
- Adding toggles and dropdowns
Skill Level Intermediate
1. The Canvas
2. Working with the RectTransform
3. Working with Text
4. Working with Images
5. Working with Buttons
6. Handling UI Input
7. Working with a Slider
8. Controlling Layout
9. Toggles, Dropdowns, and the Input Field
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.