Join Jesse Freeman for an in-depth discussion in this video Creating masks, part of Unity 5: UI.
- Now that we've covered the three…basic layout groups, let's talk about how masking works.…First, let's grab all of our groups…and just move the off to the side.…Next, we're going to copy the grid group, paste it, and move…it over so we can work with it a little bit easier.…We're going to rename this "LayoutGroup."…From here, let's remove the grid layout group component…and let's change the "Horizontal Fit" size to "Unconstrain."…We'll make the width 200.…
Next, we're going to add a vertical layout group.…And let's uncheck the "Force Child Expand" height.…Now all of our items are going to disappear.…We can fix that by selecting all the images…and adding a layout element to it.…Inside of here, we'll set the "Preferred Height" to 32.…Now that we have a new vertical layout group,…let's go back to our canvas…and create an empty game object.…We're going to give this game object…a width of 200 and a height of 200.…
Next, let's add a component, and we're going to look…at the "UI" "2-D Rect Mask."…This allows us to create a mask based on…
- 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.