Join Jesse Freeman for an in-depth discussion in this video Controlling the pivot, part of Unity 5: UI.
- So in order for us to talk about how pivot works,…let's align our button to the upper left hand corner.…I'm going to open up the anchor presets,…holding down option on Mac or alt on PC,…and select it to align to the upper left hand corner.…Now let's change the X position to 0…and the Y position to 0 as well.…Now you will see the button is half way off the screen.…If we double click on our canvas, we can also see this…in our scene view.…
Let's select a button,…and change the pivot X value.…Since we want this to be a line to the upper left hand…corner of the button,…making sure that this button now aligns to the upper…left hand corner of the screen,…we're going to set the pivot to 0.…You'll see that by changing the pivot,…our position X automatically adjusts for half of the…width of the button to maintain the location…it currently was at.…If we change this value to 0, you'll see that our buttons…left side is now aligned with the left side of the screen.…
This took me a long time to wrap my head around,…mostly because when I deal with canvases normally…
- 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.