What this book covers
Chapter 1, Designing User Interfaces, covers basic information related to designing user interfaces. The distinction between a graphic user interface and user interface is defined. It discusses the four different types of game interfaces, how to create an aesthetically pleasing UI based on principles of design, and the concept of interface metaphors. Additionally, a detailed explanation of setting the aspect ratio and resolution of a Unity project is discussed.
Chapter 2, Designing Mobile User Interfaces, covers considerations that a UI designer must take into account when developing for mobile, both aesthetically and mechanically. Additionally, it discusses the resources available to developers to help them design mobile user interfaces.
Chapter 3, Designing VR, MR, and AR UI, covers the basic concepts of designing user interfaces for VR, MR, and AR applications. It looks at how interactions in these applications differ from other applications and discusses the best practices for designing them.
Chapter 4, Universal Design and Accessibility for UI, covers basic concepts related to designing user interfaces so that they can be used by the greatest number of people. This chapter will explore the topic of universal design and designing for accessibility while discussing steps that a UI designer can take to make sure their user interfaces are as barrier-free as possible.
Chapter 5, User Interface and Input Systems in Unity, reviews the various systems provided by Unity to work with UI. Unity provides three systems for designing user interfaces and two systems for controlling the inputs. This chapter explores the various systems, compares their benefits, and discusses when to use which one of them.
Chapter 6, Canvases, Panels, and Basic Layouts, explores the development of a user interface by appropriately laying out UI elements within a Canvas. Panels are used, and an introduction to Text and Images is also provided. The examples included in this chapter show you how to lay out a basic heads up display, create a permanent background image, and develop a basic pop-up menu.
Chapter 7, Exploring Automatic Layouts, discusses how to implement the various automatic layout components to streamline the UI building process. The examples included within this chapter utilize the automatic layout functionality to create a selection menu in the HUD and a gridded inventory.
Chapter 8, The Event System and Programming for UI, covers the event system and how it pertains to the UI. How to add Event Triggers to UI elements is discussed. It covers the keywords necessary to program for the UI system, how to access UI components via code, and how to write functions that can be accessed via Event Triggers.
Chapter 9, The UI Button Component, explores the various properties of buttons. The examples in this chapter walk through how to set up keyboard and controller navigation of buttons, how to load scenes when buttons are pressed, how to create animated button transitions, and how to make buttons swap their images.
Chapter 10, UI Text and Text-TextMeshPro, discusses the properties of text more thoroughly and demonstrates how to affect their properties via code. The examples at the end of the chapter show how to create a dialog box with text that animates as if it were being typed in, how to create a custom font, and how to create text that wraps with a gradient.
Chapter 11, UI Images and Effects, shows more ways in which UI images can be used and manipulated. Additionally, it demonstrates how to apply various effects to UI elements.
Chapter 12, Using Masks, Scrollbars, and Scroll Views, covers how to create scrollable windows with masks so that your UI can hold more items than are immediately in view.
Chapter 13, Other Interactable UI Components, covers a myriad of other UI inputs. Examples of how to use the various inputs and how to create a dropdown menu with images are covered at the end of the chapter.
Chapter 14, Animating UI Elements, is all about animating the UI. The examples in this chapter show how to animate menus to fade in and out and how to create a treasure box animation using the Unity State Machine.
Chapter 15, Particles in the UI, expands upon the animation example of the previous chapter and provides further ways in which you can zhuzh up your UI using particle effects.
Chapter 16, Utilizing World Space UI, showcases how to create UI elements that exist within the game scene as opposed to on the “screen” in front of all in-game items. The examples cover how to create an interactive UI for a 2D scene and interactive, hover health bars for a 3D scene.
Chapter 17, Optimizing Unity UI, covers basic concepts of creating optimized user interfaces. It defines key terms, provides an overview of tools included within Unity that can help you determine how performant your game is, and covers various optimization strategies for working with Unity’s UI system.
Chapter 18, Getting Started with UI Toolkit, covers the new Unity UI Toolkit and explains how to use it to create basic layouts. It covers the key concepts of using this different UI system, while also demonstrating how to use it to create both Editor and runtime UI.
Chapter 19, Working with IMGUI, discusses how to use the IMGUI system to build user interfaces. After exploring the basic concepts of IMGUI, the chapter covers how to use the system to create developer tools that appear in the Editor and at runtime.
Chapter 20, The New Input System, provides an introduction to using the new Input System for easy input setup. It covers the publisher-subscriber architectural pattern while introducing the basic concepts and principles of the Input System. Additionally, it covers how to update a project that uses the Input Manager to one that uses the new Input System, as well as how to connect your code to the Input System in two different ways.