Guides UI What Is a UIElement?

UI 2 min read Updated Apr 2026

What Is a UIElement?

A `UIElement` is one piece of interface inside a Canvas.

Buttons, text labels, and images are all UIElements.

UIElements Are Not GameObjects

GameObjects live in the scene hierarchy and use Transform.

UIElements live inside a Canvas and use RectTransform.

That difference matters because UI is usually laid out relative to the screen, a panel, or another UI element, not placed freely in the world like a scene object.

The Canvas Owns the UI Tree

A Canvas is the container for UIElements.

Inside a Canvas, UIElements can have parents and children.

For example:

  • a menu panel can contain buttons
  • a health bar can contain a background image, fill image, and text label
  • a settings screen can contain rows, sliders, and labels

This creates a UI hierarchy that is separate from the GameObject hierarchy.

Common UIElement Types

The common UIElement types are:

  • Text for labels and written information
  • Image for icons, panels, backgrounds, and decorative artwork
  • Button for clickable actions

Each type inherits shared UIElement behavior, then adds its own specific fields.

For example, a Button has interaction state, while a Text element has text content and font settings.

RectTransform

Every UIElement uses a RectTransform.

The RectTransform describes:

  • where the element is anchored
  • where its pivot is
  • how large it is
  • where it sits relative to its parent

If Transform answers "where is this GameObject in the scene?", RectTransform answers "where is this UI rectangle inside its parent?"

What to Read Next