From c56ca52bbb27a1526ea3046133eed75e0d2076cb Mon Sep 17 00:00:00 2001 From: yutopp Date: Mon, 11 Mar 2019 16:18:02 +0900 Subject: [PATCH] Fix #208 --- .../VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs b/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs index a1d4a14e4..de6699cba 100644 --- a/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs +++ b/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs @@ -1,4 +1,5 @@ using UnityEditor; +using UnityEngine; namespace VRM @@ -16,12 +17,17 @@ namespace VRM return; } + EditorGUI.BeginChangeCheck(); var worldOffset = head.localToWorldMatrix.MultiplyPoint(component.FirstPersonOffset); worldOffset = Handles.PositionHandle(worldOffset, head.rotation); Handles.Label(worldOffset, "FirstPersonOffset"); + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(component, "Changed FirstPerson"); + } component.FirstPersonOffset = head.worldToLocalMatrix.MultiplyPoint(worldOffset); } }