Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Pill

The Pill class includes methods for creating and managing a VisualElement that resembles a capsule. The Pill class includes text, an icon, and two optional child VisualElements: one to the left of the pill, and one to the right of the pill.
Read time 7 minutesLast updated 6 days ago

Definition

public class Pill : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle

Constructors

Constructor

Description

Pill()Constructs a pill with its optional left and right child VisualElements.
Pill(UnityEngine.UIElements.VisualElement,UnityEngine.UIElements.VisualElement)Constructs a pill with its optional left and right child VisualElements.

Properties

Property

Description

highlightedReturns whether the pill is highlighted.
iconThe icon of the pill.
leftThe VisualElement to the left of the pill.
rightThe VisualElement to the right of the pill.
textThe text of the pill.

Inheritance

Inherited Members