What is a user interface?
A user interface (UI) is the point of interaction between a person and a software application, device, or digital experience. It includes elements such as buttons, screens, menus, controls, and other components that allow users to navigate and perform actions.
User interface is closely related to, but distinct from, user interface design, which is the discipline of creating and organizing those elements.
How does a user interface work?
A user interface works by providing a layer through which a person can interact with a software application, device, or digital system. Users provide input through elements such as buttons, menus, text fields, touchscreens, keyboards, voice commands, or gestures, and the interface communicates the system's response through visual, audio, or haptic feedback.
Different types of user interfaces support different ways of interacting. A graphical user interface (GUI), for example, uses visual elements such as windows, icons, and menus, while voice and gesture interfaces allow users to interact through speech or physical movement. The interface connects these inputs and outputs, helping users perform actions and understand the results.
What types of user interfaces are there?
User interfaces can take many forms depending on how people interact with a system. Common examples include:
Graphical user interfaces (GUIs): Interfaces built from visual elements such as buttons, menus, icons, and windows.
Command-line interfaces (CLIs): Text-based interfaces where users enter commands directly.
Voice, gesture, and gaze interfaces: Interfaces that allow users to interact through speech, physical movement, or eye tracking, particularly in immersive applications.
In games, UI elements can also be classified by how they appear in relation to the game world. Diegetic UI exists within the game world, such as a health gauge displayed on a character's equipment, while non-diegetic UI appears as an overlay, such as a heads-up display (HUD) on the screen.
How does Unity support user interfaces?
Unity provides three UI systems developers can choose from depending on the interface being built:
- UI Toolkit: A modern, web-inspired system designed for optimized performance across platforms. It supports both runtime interfaces and Editor extensions.
- uGUI: A GameObject-based system for creating runtime interfaces using components and the Game view.
- IMGUI: A legacy, code-driven system primarily used for custom Inspectors, Editor extensions, and in-game debugging displays. It isn't recommended for new runtime UI development.
See Unity's comparison of UI systems for a detailed breakdown of their features.
For a deeper implementation-level walkthrough covering wireframing, mockups, and workflows for both uGUI and UI Toolkit, see Unity's User interface design and implementation in Unity e-book.