docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MarkerEditor

    Use this class to customize marker types in the TimelineEditor.

    Inheritance
    object
    MarkerEditor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Timeline
    Assembly: Unity.Timeline.Editor.dll
    Syntax
    public class MarkerEditor

    Constructors

    MarkerEditor()

    Default constructor

    Declaration
    public MarkerEditor()

    Methods

    DrawOverlay(IMarker, MarkerUIStates, MarkerOverlayRegion)

    Draws additional overlays for a marker.

    Declaration
    public virtual void DrawOverlay(IMarker marker, MarkerUIStates uiState, MarkerOverlayRegion region)
    Parameters
    Type Name Description
    IMarker marker

    The marker to draw.

    MarkerUIStates uiState

    The visual state of the marker.

    MarkerOverlayRegion region

    The on-screen area where the marker is being drawn.

    Remarks

    Notes:

    • It is only called during TimelineWindow's Repaint step.
    • If there are multiple markers on top of each other, only the topmost marker receives the DrawOverlay call.

    GetMarkerOptions(IMarker)

    Implement this method to override the default options for drawing a marker.

    Declaration
    public virtual MarkerDrawOptions GetMarkerOptions(IMarker marker)
    Parameters
    Type Name Description
    IMarker marker

    The marker to draw.

    Returns
    Type Description
    MarkerDrawOptions

    OnCreate(IMarker, IMarker)

    Called when a marker is created.

    Declaration
    public virtual void OnCreate(IMarker marker, IMarker clonedFrom)
    Parameters
    Type Name Description
    IMarker marker

    The marker that is created.

    IMarker clonedFrom

    TThe source that the marker was copied from. This can be set to null if the marker is not a copy.

    Remarks

    The callback occurs before the marker is assigned to the track.

    In This Article
    Back to top
    Copyright © 2025 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)