docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SequenceContext

    A context for the Timeline window (RO)

    Implements
    IEquatable<SequenceContext>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Timeline
    Assembly: Unity.Timeline.Editor.dll
    Syntax
    public readonly struct SequenceContext : IEquatable<SequenceContext>
    Remarks

    The SequenceContext represents a state of the Timeline window, and is used to interact with TimelineNavigator.

    Constructors

    SequenceContext(PlayableDirector, TimelineClip)

    Initializes and returns an instance of SequenceContext.

    Declaration
    public SequenceContext(PlayableDirector director, TimelineClip clip)
    Parameters
    Type Name Description
    PlayableDirector director

    The PlayableDirector associated with the context. Must be a valid PlayableDirector reference.

    TimelineClip clip

    The TimelineClip reference that controls the sequence. Specify null to specify that the sequence is the root. If non-null, the clip must be part of a valid TimelineAsset.

    Exceptions
    Type Condition
    ArgumentNullException

    director is null.

    ArgumentException

    The clip is not part of a TrackAsset.

    ArgumentException

    The clip is part of a track but not part of a TimelineAsset.

    Properties

    clip

    The TimelineClip associated with the Timeline window in the context. (RO)

    Declaration
    public TimelineClip clip { get; }
    Property Value
    Type Description
    TimelineClip
    Remarks

    In a SubTimeline context, the clip is the TimelineClip that hosts the SubTimeline in the parent Timeline. In the root context, the clip is null.

    director

    The director associated with the Timeline window in the context. (RO)

    Declaration
    public PlayableDirector director { get; }
    Property Value
    Type Description
    PlayableDirector

    Methods

    Equals(object)

    Indicates whether the current object is equal to another object of indeterminate type.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the obj parameter; otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(SequenceContext)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(SequenceContext other)
    Parameters
    Type Name Description
    SequenceContext other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    GetHashCode()

    Hash function for SequenceContext.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Hash code for the SequenceContext.

    Overrides
    ValueType.GetHashCode()

    IsValid()

    Assesses the validity of a SequenceContext.

    Declaration
    public bool IsValid()
    Returns
    Type Description
    bool

    true if the SequenceContext is valid,false otherwise

    Remarks

    To be valid, a SequenceContext must contain a valid PlayableDirector reference.

    Operators

    operator ==(SequenceContext, SequenceContext)

    Equality operator overload.

    Declaration
    public static bool operator ==(SequenceContext left, SequenceContext right)
    Parameters
    Type Name Description
    SequenceContext left
    SequenceContext right
    Returns
    Type Description
    bool

    true if operands are equal, false otherwise.

    operator !=(SequenceContext, SequenceContext)

    Inequality operator overload.

    Declaration
    public static bool operator !=(SequenceContext left, SequenceContext right)
    Parameters
    Type Name Description
    SequenceContext left
    SequenceContext right
    Returns
    Type Description
    bool

    true if operands are not equal, false otherwise.

    Implements

    IEquatable<T>
    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)