Struct SequenceContext
A context for the Timeline window (RO)
Implements
Inherited Members
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 Timeline
Constructors
SequenceContext(PlayableDirector, TimelineClip)
Initializes and returns an instance of SequenceContext.
Declaration
public SequenceContext(PlayableDirector director, TimelineClip clip)
Parameters
Type | Name | Description |
---|---|---|
Playable |
director | The PlayableDirector associated with the context. Must be a valid PlayableDirector reference. |
Timeline |
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 Timeline |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
The |
Argument |
The |
Properties
clip
The Timeline
Declaration
public TimelineClip clip { get; }
Property Value
Type | Description |
---|---|
Timeline |
Remarks
In a SubTimeline context, the clip is the Timeline
director
The director associated with the Timeline window in the context. (RO)
Declaration
public PlayableDirector director { get; }
Property Value
Type | Description |
---|---|
Playable |
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
Overrides
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 |
---|---|---|
Sequence |
other | An object to compare with this object. |
Returns
GetHashCode()
Hash function for SequenceContext.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Hash code for the SequenceContext. |
Overrides
IsValid()
Assesses the validity of a SequenceContext.
Declaration
public bool IsValid()
Returns
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 |
---|---|---|
Sequence |
left | |
Sequence |
right |
Returns
operator !=(SequenceContext, SequenceContext)
Inequality operator overload.
Declaration
public static bool operator !=(SequenceContext left, SequenceContext right)
Parameters
Type | Name | Description |
---|---|---|
Sequence |
left | |
Sequence |
right |