summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionPreviewEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionPreviewEditor.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
index 4fd776cc..a305ad72 100644
--- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs
+++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
@@ -472,7 +472,7 @@ namespace ActionTool
float y = iy;
float contentHeight = ActionManager.GridRowCount * kFrameHeight + 40;
- Rect content = new Rect(0, 0, ((int)action.totalFrame + 1)* kFrameWidth + 30, contentHeight);
+ Rect content = new Rect(0, 0, ((int)Mathf.Ceil(action.totalFrame)) * kFrameWidth + 30, contentHeight);
float height = 300;
if (position.height - kTimeLineViewYOffset > contentHeight + 15)
height = contentHeight + 15;
@@ -497,7 +497,7 @@ namespace ActionTool
void GUI_FrameText(ref float y)
{
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Rect rect = new Rect(0, y, 20, 15);
for(int i = 0; i < sampleCount; i++)
{
@@ -538,7 +538,7 @@ namespace ActionTool
m_GridY = y;
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Rect bgRect = new Rect(kTimeLineViewXOffset, y, sampleCount * kFrameWidth, ActionManager.GridRowCount * kFrameHeight);
GUI.Box(bgRect, "");
@@ -701,7 +701,7 @@ namespace ActionTool
return;
ActionData action = ActionManager.actionData;
AnimationData animData = ActionManager.animationData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
float y = m_GridY + (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight + (animData.overrideRootMotion ? kFrameHeight : 0);
Vector2 position = e.mousePosition;
int boxCount = ActionManager.animationData.GetBoxesCount();
@@ -977,7 +977,7 @@ namespace ActionTool
return;
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Vector2 position = Event.current.mousePosition;
Rect eventRegion = new Rect(kTimeLineViewXOffset, m_GridY, sampleCount * kFrameWidth, (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight);
if (!eventRegion.Contains(position))