Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka committed Feb 28, 2021
1 parent e30ed31 commit 59330ab
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Assets/VRC2CVR/Editor/VRC2CVR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ public static void CopyToCVR(MenuCommand menuCommand) {
var cvrOverrides = new List<KeyValuePair<AnimationClip, AnimationClip>>(vrcAnims.overridesCount);
cvrAnims.GetOverrides(cvrOverrides);
for (var i = 0; i < cvrOverrides.Count; ++i) {
var vrcClipName = OverrideMap[cvrOverrides[i].Key.name];
if (vrcClipName == "") continue;
var vrcClip = vrcOverrideMap[vrcClipName];
cvrOverrides[i] = new KeyValuePair<AnimationClip, AnimationClip>(cvrOverrides[i].Key, vrcClip);
if (OverrideMap.TryGetValue(cvrOverrides[i].Key.name, out var vrcClipName)) {
if (vrcClipName == "")
continue;
var vrcClip = vrcOverrideMap[vrcClipName];
cvrOverrides[i] = new KeyValuePair<AnimationClip, AnimationClip>(cvrOverrides[i].Key, vrcClip);
} else {
Debug.LogWarning($"{cvrOverrides[i].Key.name} is unknown. please report this to VRC2CVR-YA author.");
}
}
cvrAnims.ApplyOverrides(cvrOverrides);
}
Expand Down

0 comments on commit 59330ab

Please sign in to comment.