modular-avatar/UnitTests~/Animation/MergeOrderTest.cs
kaikoga 5359e3b006
chore: Fix non-VRChat support (#650)
* add referenced assembly

* remove unused usings

* MA Merge Blend Tree is VRC specific

because it expects VRC style Animator Layer setup

* PruneParametersPass is VRChat specific

* fix: use FindAvatarTransformInParents() to be more cross platform

* fix MergeArmatureHook: nop logic for PhysBones if we do not dedup PhysBones

* fix AnimatorCombiner: ignore VRC components when non-VRC

btw, is AnimatorCombiner VRC specific?

* conditional compile some VRChat specific tests
2024-02-12 14:59:23 +09:00

32 lines
787 B
C#

#if MA_VRCSDK3_AVATARS
using System.Linq;
using nadena.dev.ndmf;
using NUnit.Framework;
using UnityEditor.Animations;
namespace modular_avatar_tests
{
public class MergeOrderTest : TestBase
{
[Test]
public void TestMergeOrder()
{
var root = CreatePrefab("MergeOrderTest.prefab");
AvatarProcessor.ProcessAvatar(root);
var fxController = FindFxController(root);
var layerNames = (FindFxController(root).animatorController as AnimatorController)
.layers.Select(l => l.name).ToArray();
Assert.AreEqual(new []
{
"1", "2", "3", "4", "5"
}, layerNames);
}
}
}
#endif