public override void OnBehaviourPause(Playable playable, FrameData info) { if (tempFrames.Count > 0) { KeyframeUtility.Replace(clip.keyframes, tempFrames); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(clip); #endif } }
public override void OnBehaviourPause(Playable playable, FrameData info) { if (tempFrames.Count > 0) { #if UNITY_EDITOR UnityEditor.Undo.RegisterCompleteObjectUndo(clip, "Record " + typeof(T).Name); #endif KeyframeUtility.Replace(clip.keyframes, tempFrames); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(clip); UnityEditor.AssetDatabase.SaveAssets(); #endif } Clear(); }