Struct TimelineSelection
A closed time range on a Timeline's axis.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public readonly struct TimelineSelection : IEquatable<TimelineSelection>
Constructors
TimelineSelection(float, float)
Construct a range. The bounds are ordered, so new TimelineSelection(6, 2) and
new TimelineSelection(2, 6) are the same range.
Declaration
public TimelineSelection(float start, float end)
Parameters
| Type | Name | Description |
|---|---|---|
| float | start | One bound of the range. |
| float | end | The other bound of the range. |
Properties
end
The end of the range, in time units.
Declaration
public float end { get; }
Property Value
| Type | Description |
|---|---|
| float |
length
The length of the range, in time units. Never negative.
Declaration
public float length { get; }
Property Value
| Type | Description |
|---|---|
| float |
start
The start of the range, in time units.
Declaration
public float start { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Equals(object)
Value equality.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The other object. |
Returns
| Type | Description |
|---|---|
| bool | True when the other object is an equal range. |
Overrides
Equals(TimelineSelection)
Value equality.
Declaration
public bool Equals(TimelineSelection other)
Parameters
| Type | Name | Description |
|---|---|---|
| TimelineSelection | other | The other range. |
Returns
| Type | Description |
|---|---|
| bool | True when both bounds match. |
GetHashCode()
Hash code.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |
Overrides
ToString()
A readable representation.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The range as a string. |