IconBadge
A rectangular badge, usually attached to another visual element.
Read time 7 minutesLast updated 9 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
public class IconBadge : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Constructors
Constructor | Description |
|---|---|
| IconBadge() | Creates a basic comment badge. |
| IconBadge(UnityEngine.UIElements.VisualTreeAsset) | Creates a basic comment badge. |
Properties
Property | Description |
|---|---|
| alignment | Relative alignment between the badge and its target. The alignment will influence icon and tip position. |
| badgeText | Text displayed next to the badge on mouse hover. |
| distance | Distance between the badge and its target element. |
| target | Target element to which this badge is attached. |
| visualStyle | The visual style for the badge. Built-in values are "error" and "comment". |
Methods
Method | Description |
|---|---|
| AttachTo | Attaches this badge to another element. |
| Detach | Detaches this badge from its target. |
| HandleEventBubbleUp | Executes logic on this element during the BubbleUp phase, immediately before this element's BubbleUp callbacks. Calling StopPropagation will prevent further invocations of this method along the propagation path. |
Static Methods
Method | Description |
|---|---|
| CreateComment | Creates an IconBadge with the "comment" visual style. |
| CreateError | Creates an IconBadge with the "error" visual style. |