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); } }