Class MarkerEditor
Use this class to customize marker types in the TimelineEditor.
Inherited Members
Namespace: UnityEditor.Timeline
Assembly: Unity.Timeline.Editor.dll
Syntax
public class MarkerEditor
Constructors
MarkerEditor()
Default constructor
Declaration
public MarkerEditor()
Methods
DrawOverlay(IMarker, MarkerUIStates, MarkerOverlayRegion)
Draws additional overlays for a marker.
Declaration
public virtual void DrawOverlay(IMarker marker, MarkerUIStates uiState, MarkerOverlayRegion region)
Parameters
Type | Name | Description |
---|---|---|
IMarker | marker | The marker to draw. |
MarkerUIStates | uiState | The visual state of the marker. |
MarkerOverlayRegion | region | The on-screen area where the marker is being drawn. |
Remarks
Notes:
- It is only called during TimelineWindow's Repaint step.
- If there are multiple markers on top of each other, only the topmost marker receives the DrawOverlay call.
GetMarkerOptions(IMarker)
Implement this method to override the default options for drawing a marker.
Declaration
public virtual MarkerDrawOptions GetMarkerOptions(IMarker marker)
Parameters
Type | Name | Description |
---|---|---|
IMarker | marker | The marker to draw. |
Returns
Type | Description |
---|---|
MarkerDrawOptions |
OnCreate(IMarker, IMarker)
Called when a marker is created.
Declaration
public virtual void OnCreate(IMarker marker, IMarker clonedFrom)
Parameters
Type | Name | Description |
---|---|---|
IMarker | marker | The marker that is created. |
IMarker | clonedFrom | TThe source that the marker was copied from. This can be set to null if the marker is not a copy. |
Remarks
The callback occurs before the marker is assigned to the track.