docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Namespace UnityEngine.UI

    Classes

    AnimationTriggers

    Structure that stores the state of an animation transition on a Selectable.

    AspectRatioFitter

    Resizes a RectTransform to fit a specified aspect ratio.

    BaseMeshEffect

    Base class for effects that modify the generated Mesh.

    Button

    A standard button that sends an event when clicked.

    Button.ButtonClickedEvent

    A UnityEvent raised when the button is clicked.

    CanvasScaler

    The Canvas Scaler component is used for controlling the overall scale and pixel density of UI elements in the Canvas. This scaling affects everything under the Canvas, including font sizes and image borders.

    CanvasUpdateRegistry

    A place where CanvasElements can register themselves for rebuilding.

    ClipperRegistry

    Registry class to keep track of all IClippers that exist in the scene

    Clipping

    Utility class to help when clipping using IClipper.

    ContentSizeFitter

    Resizes a RectTransform to fit the size of its content.

    DefaultControls

    Utility class for creating default implementations of builtin UI controls.

    Dropdown

    A standard dropdown that presents a list of options when clicked, of which one can be chosen.

    Dropdown.DropdownEvent

    A UnityEvent_1 raised when the selected index changes, passing the new index as an int.

    Dropdown.DropdownItem

    Component placed on each item in the dropdown list. Handles hover highlighting and cancel navigation.

    Dropdown.OptionData

    Stores the text and/or image of a single option in the dropdown list.

    Dropdown.OptionDataList

    Class used internally to store the list of Dropdown.OptionData entries for the Dropdown.

    FontData

    Struct for storing Text generation settings.

    FontUpdateTracker

    Utility class that is used to help with Text update.

    Graphic

    Base class for all UI components that should be derived from when creating new Graphic types.

    GraphicRaycaster

    A derived BaseRaycaster to raycast against Graphic elements.

    GraphicRebuildTracker

    EditorOnly class for tracking all Graphics. Used when a source asset is reimported into the editor to ensure that Graphics are updated as intended.

    GraphicRegistry

    Registry which maps a Graphic to the canvas it belongs to.

    GridLayoutGroup

    Layout class to arrange child elements in a grid format.

    HorizontalLayoutGroup

    Arranges child elements side by side horizontally.

    HorizontalOrVerticalLayoutGroup

    Abstract base class for HorizontalLayoutGroup and VerticalLayoutGroup to generalize common functionality.

    Image

    Image is a textured element in the UI hierarchy.

    InputField

    Turn a simple label into a interactable input field.

    InputField.EndEditEvent

    A UnityEvent_1 raised when editing ends, passing the final text.

    InputField.OnChangeEvent

    A UnityEvent_1 raised each time the text changes, passing the new text.

    InputField.SubmitEvent

    A UnityEvent_1 raised when the user submits the input field, passing the final text.

    LayoutElement

    Add this component to a GameObject to make it into a layout element or override values on an existing layout element.

    LayoutGroup

    Abstract base class for layout groups.

    LayoutRebuilder

    Wrapper class for managing layout rebuilding of CanvasElement.

    LayoutUtility

    Utility functions for querying layout elements for their minimum, preferred, and flexible sizes.

    Mask

    A component for masking children elements.

    MaskUtilities

    Mask related utility class. This class provides masking-specific utility functions.

    MaskableGraphic

    A Graphic that is capable of being masked out.

    MaskableGraphic.CullStateChangedEvent

    A UnityEvent_1 fired when the graphic's cull state changes.

    Outline

    Adds an outline to a graphic using IVertexModifier.

    PositionAsUV1

    An IVertexModifier which sets the raw vertex position into UV1 of the generated verts.

    RawImage

    Displays a Texture2D for the UI System.

    RaycastReceiver

    Intercepts raycasts from a GraphicRaycaster. Use it to block objects or detect raycasts.

    RectMask2D

    A 2D rectangular mask that allows for clipping / masking of areas outside the mask.

    SafeArea

    A component that drives a RectTransform to fit within the device's safe area.

    ScrollRect

    A component for making a child RectTransform scroll.

    ScrollRect.ScrollRectEvent

    A UnityEvent_1 raised when the scroll position changes, passing the normalized position as a Vector2.

    Scrollbar

    A standard scrollbar with a variable sized handle that can be dragged between 0 and 1.

    Scrollbar.ScrollEvent

    A UnityEvent_1 raised when the scrollbar value changes, passing the new value as a float.

    Selectable

    Simple selectable object - derived from to create a selectable control.

    Shadow

    Adds a drop shadow to a graphic by duplicating its mesh vertices, offsetting them by effectDistance, and recoloring them with effectColor.

    Slider

    A standard slider that can be moved between a minimum and maximum value.

    Slider.SliderEvent

    A UnityEvent_1 raised when the slider value changes, passing the new value as a float.

    StencilMaterial

    Dynamic material class makes it possible to create custom materials on the fly on a per-Graphic basis, and still have them get cleaned up correctly.

    Text

    The default Graphic to draw font data to screen.

    Toggle

    A standard toggle that has an on / off state.

    Toggle.ToggleEvent

    A UnityEvent_1 raised when the toggle value changes, passing the new state as a bool.

    ToggleGroup

    A component that represents a group of UI.Toggles.

    VertexHelper

    A utility class that can aid in the generation of meshes for the UI.

    VerticalLayoutGroup

    Arranges child layout elements vertically.

    Structs

    ColorBlock

    Structure that stores the state of a color transition on a Selectable.

    DefaultControls.Resources

    Object used to pass resources to use for the default controls.

    Navigation

    Structure storing details related to navigation.

    SpriteState

    Structure that stores the state of a sprite transition on a Selectable.

    Interfaces

    DefaultControls.IFactoryControls

    Factory interface to create a GameObject in this class. It is necessary to use this interface in the whole class so MenuOption and Editor can work using ObjectFactory and default Presets.

    ICanvasElement

    This is an element that can live on a Canvas.

    IClippable

    Interface for elements that can be clipped if they are under an IClipper

    IClipper

    Interface that can be used to recieve clipping callbacks as part of the canvas update loop.

    ILayoutController

    Base interface to be implemented by components that control the layout of RectTransforms.

    ILayoutElement

    A component is treated as a layout element by the auto layout system if it implements ILayoutElement.

    ILayoutGroup

    ILayoutGroup is an ILayoutController that should drive the RectTransforms of its children.

    ILayoutIgnorer

    A RectTransform will be ignored by the layout system if it has a component which implements ILayoutIgnorer.

    ILayoutSelfController

    ILayoutSelfController is an ILayoutController that should drive its own RectTransform.

    IMaskable

    This element is capable of being masked out.

    IMaterialModifier

    Use this interface to modify a Material that renders a Graphic. The Material is modified before the it is passed to the CanvasRenderer.

    IMeshModifier

    Interface which allows for the modification of verticies in a Graphic before they are passed to the CanvasRenderer. When a Graphic generates a list of vertices they are passed (in order) to any components on the GameObject that implement IMeshModifier. This component can modify the given Mesh.

    Enums

    AspectRatioFitter.AspectMode

    Specifies a mode to use to enforce an aspect ratio.

    CanvasScaler.ScaleMode

    Determines how UI elements in the Canvas are scaled.

    CanvasScaler.ScreenMatchMode

    Scale the canvas area with the width as reference, the height as reference, or something in between.

    CanvasScaler.Unit

    The possible physical unit types

    CanvasUpdate

    Values of 'update' called on a Canvas update.

    ContentSizeFitter.FitMode

    Determines how the size of the layout element will adapt to its size properties.

    GraphicRaycaster.BlockingObjects

    Type of raycasters to check against to check for canvas blocking elements.

    GridLayoutGroup.Axis

    The grid axis we are looking at.

    GridLayoutGroup.Constraint

    Constraint type on either the number of columns or rows.

    GridLayoutGroup.Corner

    Which corner is the starting corner for the grid.

    Image.FillMethod

    The possible fill method types for a Filled Image.

    Image.Origin180

    Origin for the Image.FillMethod.Radial180.

    Image.Origin360

    One of the points of the Arc for the Image.FillMethod.Radial360.

    Image.Origin90

    Origin for the Image.FillMethod.Radial90.

    Image.OriginHorizontal

    Origin for the Image.FillMethod.Horizontal.

    Image.OriginVertical

    Origin for the Image.FillMethod.Vertical.

    Image.Type

    Image fill type controls how to display the image.

    InputField.CharacterValidation

    The type of characters that are allowed to be added to the string.

    InputField.ContentType

    Setting the content type acts as a shortcut for setting a combination of InputType, CharacterValidation, LineType, and TouchScreenKeyboardType

    InputField.EditState

    Describes the editing state returned by key-press processing.

    InputField.InputType

    Type of data expected by the input field mobile keyboard.

    InputField.LineType

    The LineType is used to describe the behavior of the InputField.

    Navigation.Mode

    Navigation mode enumeration.

    SafeArea.AlignmentMode

    Directions to align the inset area to center the UI. Relative to Reference Orientation.

    SafeArea.SafeAreaMode

    Whether to respect the safe area of the device. Relative to Reference Orientation.

    ScrollRect.MovementType

    A setting for which behavior to use when content moves beyond the confines of its container.

    ScrollRect.ScrollbarVisibility

    Enum for which behavior to use for scrollbar visibility.

    Scrollbar.Direction

    Setting that indicates one of four directions the scrollbar will travel.

    Selectable.SelectionState

    An enumeration of selected states of objects

    Selectable.Transition

    Transition mode for a Selectable.

    Slider.Direction

    Setting that indicates one of four directions.

    Toggle.ToggleTransition

    Display settings for when a toggle is activated or deactivated.

    Delegates

    InputField.OnValidateInput

    Delegate for the onValidateInput callback. Called for each character entered to validate or replace it.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)