
Explore Unity UI concepts as Corey and Omar guide you through starting or loading a game, asset loading progress, addressable package for a health HUD, and settings and pause menus.
Unity 2021.2 was released after this course was published. We recommend you use this version as it comes with the UI Toolkit already installed, and contains a lot of bugfixes.
https://forum.unity.com/threads/unity-2021-2-is-now-available.1187908/
Set up a new Unity project, enable pre-release packages, and install the UI toolkit and UI builder via package manager and GitHub to enable UI toolkit use.
Create UI and inventory folders, add a UI document (XML) to define visuals and layout for the Unity UI Toolkit, and display a hello world label in the top left.
Develop a plain button custom control in Unity UI Toolkit by inheriting from button, removing default styles, and applying the plain button class in the UI builder.
Import a package of sprites for the course, access the package via the description link, import into Unity, create a Resources folder, and move assets there.
Explore display, opacity, and visibility concepts, and learn how display: none removes an element from layout, while visibility: hidden keeps layout but hides the element; understand overflow behavior for children.
Explore how the flex system in Unity UI Toolkit controls item sizes, alignment, and wrapping using flex basis, flex shrink, flex grow, direction, and wrap to distribute space.
Aligns child elements along the cross axis via line items, with column direction; position buttons left, center, or right, and justify content along the main axis to center or bottom.
Define element size with width and height in pixels, percentages, or inherited values. Describe how margin adds space outside borders and padding adds space inside content.
Control text size in pixels, percentages, or inherited values; wrap, align, and apply bold or italic styles, then use nine-slice resizing and set background color or image with tint.
Apply borders with inline styles, adjust color, thickness, and radius to shape borders and even form circles. Preview mode shows a custom cursor image on hover to demonstrate the interaction.
Represent health with heart icons in a Unity UI toolkit lesson, building a Hearts panel and a script that toggles heart visibility based on max and current health.
Wire the exit button to quit the game through a confirmation modal, with confirm and cancel actions, and manage the modal's display and visibility in the Unity UI toolkit.
Trigger the start new game action to load the tutorial scene and unload the main menu, using load channels to set the starting locations.
Create a quit game confirmation modal by building an overlay, header, content, and footer. Add confirm and close buttons and wire a cancel function to close or exit.
Press escape to open a pause menu in Unity using a UI document, with a full-screen black overlay and centered panel, featuring a resume button that pauses and resumes gameplay.
Add a main menu button to the pause menu and wire it to open the main menu. Replace old UI code and disable listeners to avoid memory leaks.
Build a pause menu in Unity UI Toolkit by creating a pause menu UI document, wiring body, header, and content, and adding resume, settings, and main menu buttons.
Open the settings UI from the main menu, store XML files, and use a settings UXML document with a header and close button to toggle display with flex and none.
Create an audio source on a game object, add audio clip, set up an audio mixer with music and sound effects groups, and expose master, music, and sound effects volumes.
In this Unity UI Toolkit lecture, build an audio settings panel with master, music, and sound effects sliders, map values to an audio mixer using decibels and value change callbacks.
Learn to save audio settings in Unity UI Toolkit by wiring an audio manager to the audio mixer and implementing save and reset for master, music, and SFX volumes.
Create a visual settings UI in Unity UI Toolkit, with panels, labels, and next/previous full screen and resolution controls, plus a Visual Settings Element to manage state and updates.
Implement a visual settings system that saves and restores resolution and full screen state using player prefs, with save, reset, and settings manager startup logic.
Configure a remote addressable catalog for the Unity UI Toolkit using Google Cloud Platform, create a bucket, set public read access, and organize channels and scenes for remote builds.
Create a loading screen ui with a full-canvas panel, centered elements, a Chop Shop title, a 75 percent width progress bar, and extract styles to a loading screen class.
Create a property drawer with a bar attribute using the Unity UI Toolkit, then implement a custom editor to render the inspector via a visual element.
Create a scriptable object named Bob, add a tax string, and build a custom editor to bind a serialized list with dynamic height and reorderable items in Unity.
In this course, we will design and implement user interfaces that are common across all games, using the Unity UI Toolkit package. The UI Toolkit makes it easier for people with a web developer background to create user interfaces in Unity.
Who is this course for?
This is an advanced course designed for those who already have a fundamental grasp of Unity, and want to learn how to add user interfaces to their game using SOLID design principles.
Are there any course requirements?
A solid understanding of C#
Previous experience using Unity
What you will learn:
How to work with Unity's new UI Toolkit and UI Builder
How to implement a save system using ScriptableObjects
How to manage scenes using ScriptableObjects
How to use Unity's Addressable Asset System
How to create custom controls
How to create a loading screen that displays the progress of assets being downloaded from Google's Cloud Platform
How to design a main menu
How to implement a health bar
How to write code that's efficient and modular
How to create a settings screen that can be used to adjust the game’s volume and resolution
How to implement a pause menu that pauses the game as long as it remains open
How to make use of USS properties
How to create responsive user interfaces that adjust to various screen sizes
If all this sounds appealing to you, please join me, and I’ll see you inside the course.