Class TimelineMarker
A named marker — a flagged vertical line spanning a Timeline.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[UxmlElement]
public class TimelineMarker : TimelinePart, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
Remarks
Add markers through AddMarker(TimelineMarker), which puts them in the layer above every lane. A marker is inert chrome: it never takes the pointer, so a clip underneath it stays draggable.
Constructors
TimelineMarker()
Default constructor.
Declaration
public TimelineMarker()
Fields
flagUssClassName
The styling class of the marker's flag.
Declaration
public const string flagUssClassName = "appui-timeline__marker-flag"
Field Value
| Type | Description |
|---|---|
| string |
guideUssClassName
The styling class of the marker's full-height guide line.
Declaration
public const string guideUssClassName = "appui-timeline__marker-guide"
Field Value
| Type | Description |
|---|---|
| string |
labelUssClassName
The styling class of the marker's label.
Declaration
public const string labelUssClassName = "appui-timeline__marker-label"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The TimelineMarker main styling class.
Declaration
public const string ussClassName = "appui-timeline__marker"
Field Value
| Type | Description |
|---|---|
| string |
Properties
color
The marker colour. Unset falls back to the stylesheet's muted foreground.
Declaration
[Tooltip("The marker colour. Unset falls back to the muted foreground token.")]
[CreateProperty]
[UxmlAttribute]
public Optional<Color> color { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<Color> |
label
The short text shown beside the flag.
Declaration
[Tooltip("The short text shown beside the flag.")]
[CreateProperty]
[UxmlAttribute]
public string label { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
showGuide
Whether the faint full-height guide line is drawn.
Declaration
[Tooltip("Whether the faint full-height guide line is drawn.")]
[CreateProperty]
[UxmlAttribute]
public bool showGuide { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
time
The marker's position on the time axis, in time units.
Declaration
[Tooltip("The marker's position on the time axis, in time units.")]
[CreateProperty]
[UxmlAttribute]
public float time { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
OnAxisChanged()
Re-project this part onto the current axis.
Declaration
protected override void OnAxisChanged()
Overrides
Remarks
Called on attach and on every axis change — a scale, zoom, pan, playhead, tick or
selection change. Guard against a null axis.