diff options
author | chai <chaifix@163.com> | 2021-09-08 19:18:57 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-08 19:18:57 +0800 |
commit | 2fa67922f08ef39b4d70bad001592aedf22c9018 (patch) | |
tree | 5945b091a2651b8350760bdf532e93fcddc96016 /Assets/ActionTool/Editor/ActionRootMotionEditor.cs | |
parent | 55d289f8eff1af2d2a2ff02c878faa354dcf6c91 (diff) |
*misc
Diffstat (limited to 'Assets/ActionTool/Editor/ActionRootMotionEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionRootMotionEditor.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Assets/ActionTool/Editor/ActionRootMotionEditor.cs b/Assets/ActionTool/Editor/ActionRootMotionEditor.cs index f6a97efe..020c86b6 100644 --- a/Assets/ActionTool/Editor/ActionRootMotionEditor.cs +++ b/Assets/ActionTool/Editor/ActionRootMotionEditor.cs @@ -38,11 +38,15 @@ namespace ActionTool tex.Apply();
IsRecord = false;
+
+ ActionManager.gizmos.ShowRootMotionGizmos(true);
}
private void OnDisable()
{
IsRecord = false;
+
+ ActionManager.gizmos.ShowRootMotionGizmos(false);
}
private void Update()
@@ -74,7 +78,7 @@ namespace ActionTool {
x += kToolbarControlMargin;
Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize);
- IsRecord = GUI.Toggle(rect, IsRecord, EditorGUIUtility.IconContent("d_Animation.Record"), GUI.skin.button);
+ IsRecord = GUI.Toggle(rect, IsRecord, EditorGUIUtility.IconContent("d_Animation.Record", "Record"), GUI.skin.button);
x += kToolbarControlSize;
}
@@ -84,17 +88,19 @@ namespace ActionTool GUI.enabled = false;
x += kToolbarControlMargin;
Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize);
- if (GUI.Button(rect, m_UITextureTakeRecord))
+ if (GUI.Button(rect, EditorGUIUtility.IconContent("Animation.AddKeyframe", "Key Frame")))
{
Vector3 pos = ActionManager.unitInstance.transform.position;
int frame = (int)ActionManager.actionData.curAnimFrame;
ActionManager.animationData.rootMotionOverrideData.SetPosition(frame, pos);
ActionManager.PreviewWindow.Repaint();
+ EditorWindow.GetWindow<SceneView>()?.Repaint();
+ SceneView.RepaintAll();
}
GUI.enabled = true;
x += kToolbarControlSize;
}
-
+
void GUI_Delete(ref float x, ref float y)
{
if (!IsRecord)
@@ -110,5 +116,6 @@ namespace ActionTool GUI.enabled = true;
x += kToolbarControlSize;
}
+
}
}
\ No newline at end of file |