From 7bd7b4c6c3be6840cab06aa4d8a38619bce44705 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 7 Sep 2021 19:39:28 +0800 Subject: *misc --- Assets/ActionTool/Editor/ActionPreviewEditor.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Assets/ActionTool/Editor') diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index 20cfc16b..c9358f98 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -289,8 +289,9 @@ namespace ActionTool GUI.Label(new Rect(xl, y, 105, 15), "RootMotion:", styles.textMiddle); if(actionData.rootMotion != null && (animationData == null || animationData.overrideRootMotion == false)) { - width = styles.textMiddleBold.CalcSize(new GUIContent(ActionManager.actionData.rootMotionPath)).x; - GUI.Label(new Rect(xr, y, width, 15), ActionManager.actionData.rootMotionPath, styles.textMiddleBold); + string content = ActionManager.actionData.rootMotionPath + " (Editor Only)"; + width = styles.textMiddleBold.CalcSize(new GUIContent(content)).x; + GUI.Label(new Rect(xr, y, width, 15), content, styles.textMiddleBold); if (GUI.Button(new Rect(xr + width + 10, y, 50, 15), "Info")) { RootMotionData rootMotion = ActionManager.actionData.rootMotion; @@ -682,7 +683,7 @@ namespace ActionTool float y = m_GridY + (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight; Vector2 position = e.mousePosition; int boxCount = ActionManager.animationData.GetBoxesCount(); - Rect boxRegion = new Rect(kTimeLineViewXOffset, y, action.totalFrame * kFrameWidth, boxCount * kFrameHeight); + Rect boxRegion = new Rect(kTimeLineViewXOffset, y, sampleCount * kFrameWidth, boxCount * kFrameHeight); if (!boxRegion.Contains(position)) return; // 找到对应的box和帧 @@ -706,7 +707,7 @@ namespace ActionTool { Debug.LogError("[ActionTool] 错误的点击"); } - } + } void GUI_DrawSeperateLine(float x, float y, float height) { -- cgit v1.1-26-g67d0