docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TimelineKeyframe

    A point keyframe on a TimelineTrack.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    TimelinePart
    TimelineKeyframe
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    Inherited Members
    TimelinePart.axis
    TimelinePart.timeline
    TimelinePart.TimeToX(float)
    BaseVisualElement.contextPrefix
    BaseVisualElement.densityOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.SetActivePseudoState(bool)
    VisualElement.SetCheckedPseudoState(bool)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.IsMarkedForRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.SetBinding(BindingId, Binding)
    VisualElement.GetBinding(BindingId)
    VisualElement.TryGetBinding(BindingId, out Binding)
    VisualElement.GetBindingInfos()
    VisualElement.GetBindingInfos(List<BindingInfo>)
    VisualElement.HasBinding(BindingId)
    VisualElement.ClearBinding(BindingId)
    VisualElement.ClearBindings()
    VisualElement.GetHierarchicalDataSourceContext()
    VisualElement.GetDataSourceContext(BindingId)
    VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
    VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
    VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.disablePlayModeTint
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.scaledPixelsPerPoint
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.hasActivePseudoState
    VisualElement.hasInactivePseudoState
    VisualElement.hasHoverPseudoState
    VisualElement.hasCheckedPseudoState
    VisualElement.hasEnabledPseudoState
    VisualElement.hasDisabledPseudoState
    VisualElement.hasFocusPseudoState
    VisualElement.hasRootPseudoState
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.languageDirection
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.dataSource
    VisualElement.dataSourcePath
    VisualElement.dataSourceType
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.contentContainer
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.resolvedStyle
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
    CallbackEventHandler.UnregisterAllRemovableCallbacks()
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    CallbackEventHandler.HandleEventBubbleUp(EventBase)
    CallbackEventHandler.HandleEventTrickleDown(EventBase)
    CallbackEventHandler.ExecuteDefaultAction(EventBase)
    CallbackEventHandler.NotifyPropertyChanged(in BindingId)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    [UxmlElement]
    public class TimelineKeyframe : TimelinePart, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
    Remarks

    The glyph is centred on its time — a diamond by default, matching the animation editors. Turn on draggable to let the user re-time it; the new time is committed once on release through moved, snapped to the Timeline's step.

    Constructors

    TimelineKeyframe()

    Default constructor.

    Declaration
    public TimelineKeyframe()

    Fields

    glyphUssClassName

    The styling class of the glyph inside the keyframe's hit target.

    Declaration
    public const string glyphUssClassName = "appui-timeline__keyframe-glyph"
    Field Value
    Type Description
    string

    mutedUssClassName

    The styling class applied while the keyframe is muted.

    Declaration
    public const string mutedUssClassName = "appui-timeline__keyframe--muted"
    Field Value
    Type Description
    string

    smallUssClassName

    The styling class applied while the keyframe draws its small glyph.

    Declaration
    public const string smallUssClassName = "appui-timeline__keyframe--size-small"
    Field Value
    Type Description
    string

    ussClassName

    The TimelineKeyframe main styling class.

    Declaration
    public const string ussClassName = "appui-timeline__keyframe"
    Field Value
    Type Description
    string

    Properties

    color

    The glyph fill. Unset falls back to the track colour, then to the stylesheet.

    Declaration
    [Tooltip("The glyph fill. Unset falls back to the track colour.")]
    [CreateProperty]
    [UxmlAttribute]
    public Optional<Color> color { get; set; }
    Property Value
    Type Description
    Optional<Color>

    draggable

    Whether dragging re-times the keyframe.

    Declaration
    [Tooltip("Whether dragging re-times the keyframe.")]
    [CreateProperty]
    [UxmlAttribute]
    public bool draggable { get; set; }
    Property Value
    Type Description
    bool

    id

    A stable identifier for the keyframe.

    Declaration
    [Tooltip("A stable identifier for the keyframe.")]
    [CreateProperty]
    [UxmlAttribute]
    public string id { get; set; }
    Property Value
    Type Description
    string

    muted

    Whether the keyframe is dimmed to a smaller, quieter marker.

    Declaration
    [Tooltip("Whether the keyframe is dimmed to a smaller, quieter marker.")]
    [CreateProperty]
    [UxmlAttribute]
    public bool muted { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    For a key that exists but is not in play -- a muted track's, or one on a layer the editor is not currently soloing. It stays pickable: muted is about emphasis, not interactivity.

    resolvedSize

    The size the glyph actually draws at, after deferring to the Timeline and to muted.

    Declaration
    public TimelineKeySize resolvedSize { get; }
    Property Value
    Type Description
    TimelineKeySize

    selected

    Whether the keyframe draws its selected outline.

    Declaration
    [Tooltip("Whether the keyframe draws its selected outline.")]
    [CreateProperty]
    [UxmlAttribute]
    public bool selected { get; set; }
    Property Value
    Type Description
    bool

    shape

    The glyph shape.

    Declaration
    [Tooltip("The glyph shape.")]
    [CreateProperty]
    [UxmlAttribute]
    public TimelineKeyframeShape shape { get; set; }
    Property Value
    Type Description
    TimelineKeyframeShape

    size

    The glyph size. Auto, the default, defers to the Timeline's keySize, then to small for a muted key and regular otherwise.

    Declaration
    [Tooltip("The glyph size. Auto defers to the Timeline's keySize, then to small when muted.")]
    [CreateProperty]
    [UxmlAttribute]
    public TimelineKeySize size { get; set; }
    Property Value
    Type Description
    TimelineKeySize

    time

    The keyframe's position on the time axis, in time units.

    Declaration
    [Tooltip("The keyframe's position on the time axis, in time units.")]
    [CreateProperty]
    [UxmlAttribute]
    public float time { get; set; }
    Property Value
    Type Description
    float

    Methods

    GetShapeUssClassName(TimelineKeyframeShape)

    Declaration
    public static string GetShapeUssClassName(TimelineKeyframeShape enumValue)
    Parameters
    Type Name Description
    TimelineKeyframeShape enumValue
    Returns
    Type Description
    string

    OnAxisChanged()

    Re-project this part onto the current axis.

    Declaration
    protected override void OnAxisChanged()
    Overrides
    TimelinePart.OnAxisChanged()
    Remarks

    Called on attach and on every axis change — a scale, zoom, pan, playhead, tick or selection change. Guard against a null axis.

    Events

    clicked

    Raised when the keyframe is clicked without dragging.

    Declaration
    public event Action clicked
    Event Type
    Type Description
    Action

    moved

    Raised once on release with the committed time.

    Declaration
    public event Action<float> moved
    Event Type
    Type Description
    Action<float>

    Implements

    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorOfType<T>(VisualElement, bool)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    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)