docs.unity.cn
    Show / Hide Table of Contents

    Struct SequenceContext

    A context for the Timeline window (RO)

    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEditor.Timeline
    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 readonly 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 readonly 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 readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    An object to compare with this object.

    Returns
    Type Description
    Boolean

    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 readonly bool Equals(SequenceContext other)
    Parameters
    Type Name Description
    SequenceContext other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

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

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Hash function for SequenceContext.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32

    Hash code for the SequenceContext.

    Overrides
    ValueType.GetHashCode()

    IsValid()

    Assesses the validity of a SequenceContext.

    Declaration
    public readonly bool IsValid()
    Returns
    Type Description
    Boolean

    true if the SequenceContext is valid,false otherwise

    Remarks

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

    Operators

    Equality(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
    Boolean

    true if operands are equal, false otherwise.

    Inequality(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
    Boolean

    true if operands are not equal, false otherwise.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, April 27, 2023