Struct SequenceContext
A context for the Timeline window (RO)
Inherited Members
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 |
|
ArgumentException | The |
ArgumentException | The |
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 |
Overrides
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 |
Implements
GetHashCode()
Hash function for SequenceContext.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code for the SequenceContext. |
Overrides
IsValid()
Assesses the validity of a SequenceContext.
Declaration
public readonly bool IsValid()
Returns
Type | Description |
---|---|
Boolean |
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 |
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 |