Join Jesse Freeman for an in-depth discussion in this video Using layout elements, part of Unity 5: UI.
- Let's go back int our Horizontal Layout Group.…As you remember,…we're forcing the child's width and height…to expand to fit within the constraints of the parent group.…Let's select all the items in the horizontal layout group…and we're going to add a new component.…This new component is going to be a layout element.…Let's take a look at the layout element.…Here you can see we can choose to ignore the layout…if we wanted to have an item…that floats outside of its parent layout…we can set a minimum width and height,…we can set a preferred width and height,…and we can also have a flexible width and height…which is a percentage between zero and one…of how much space it should fill up…based on the other elements in the layout.…
Let's change the preferred width and height…of all these elements to 64.…Next, we'll need to select the horizontal layout…and remove the height and width expanding.…Let's change the width to be 200.…And now the images inside of this layout…are closer to the size that we wanted them to be.…
- 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.