From 259d0669aecc184af3c99f3cf9d279f07ae0168f Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 9 Sep 2021 19:47:02 +0800 Subject: *misc --- Assets/ActionTool/Editor/ActionPreviewEditor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs') diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index 3a6f9ede..d2582289 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -700,8 +700,9 @@ namespace ActionTool if (e.button != 1 || !e.isMouse || e.type != EventType.MouseDown) return; ActionData action = ActionManager.actionData; + AnimationData animData = ActionManager.animationData; int sampleCount = (int)action.totalFrame + 1; - float y = m_GridY + (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight; + float y = m_GridY + (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight + (animData.overrideRootMotion ? kFrameHeight : 0); Vector2 position = e.mousePosition; int boxCount = ActionManager.animationData.GetBoxesCount(); Rect boxRegion = new Rect(kTimeLineViewXOffset, y, sampleCount * kFrameWidth, boxCount * kFrameHeight); -- cgit v1.1-26-g67d0