From 512a7b99957b412592efb4435ceb77cf50f1f86e Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 23 Sep 2023 19:39:49 +0900 Subject: [PATCH] fix: proxy animations not being preserved --- .../Editor/Animation/AnimationUtil.cs | 3 ++- .../Editor/Animation/TrackObjectRenamesContext.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/Animation/AnimationUtil.cs b/Packages/nadena.dev.modular-avatar/Editor/Animation/AnimationUtil.cs index 5468c6dd..07c05bf3 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/Animation/AnimationUtil.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/Animation/AnimationUtil.cs @@ -173,7 +173,8 @@ public static bool IsProxyAnimation(this Motion m) // 3. VCC based installations of the VRCSDK // 4. Very old VCC based installations of the VRCSDK where proxy animations were copied into Assets return path.Contains("/AV3 Demo Assets/Animation/ProxyAnim/proxy") - || path.Contains("/VRCSDK/Examples3/Animation/ProxyAnim/proxy"); + || path.Contains("/VRCSDK/Examples3/Animation/ProxyAnim/proxy") + || path.StartsWith("Packages/com.vrchat."); } /// diff --git a/Packages/nadena.dev.modular-avatar/Editor/Animation/TrackObjectRenamesContext.cs b/Packages/nadena.dev.modular-avatar/Editor/Animation/TrackObjectRenamesContext.cs index 5e5a40ca..88cb808d 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/Animation/TrackObjectRenamesContext.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/Animation/TrackObjectRenamesContext.cs @@ -272,6 +272,8 @@ private AnimationClip ApplyMappingsToClip(AnimationClip originalClip, if (originalClip == null) return null; if (clipCache != null && clipCache.TryGetValue(originalClip, out var cachedClip)) return cachedClip; + if (originalClip.IsProxyAnimation()) return originalClip; + var newClip = new AnimationClip(); newClip.name = originalClip.name;