Summary
Called while drawing the background GUI for the
Animancer.Editor.TimelineGUI
for the
Animancer.IHasEvents.Events
.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Editor - Containing Type
- ITransitionGUI
Syntax
void OnTimelineBackgroundGUI()
Remarks
Example:
// For the AttackTransition example from ITransitionGUI.
// Draw the hit time as a highlighted area.
public void OnTimelineBackgroundGUI()
{
if (Event.current.type != EventType.Repaint)
return;
Color previousColor = GUI.color;
TimelineGUI timelineGUI = TimelineGUI.Current;
float start = timelineGUI.SecondsToPixels(_HitStartTime);
float end = timelineGUI.SecondsToPixels(_HitEndTime);
Rect area = new Rect(
start,
0,
end - start,
timelineGUI.Area.height - timelineGUI.TickHeight);
Color color = new Color(0.9f, 0.4f, 0.25f, 0.5f);
EditorGUI.DrawRect(area, color);
GUI.color = previousColor;
}
Return Value
Type | Description |
---|---|
void |