modular-avatar/UnitTests~/Animation/MergeOrderTest.cs
bd_ cdc64838bb feat: ensure that correct layers are toggled off in MMD worlds, even after messing with layer order
We make the assumption that the MMD world will _specifically_
be disabling layers 1 and 2.
2025-03-14 20:38:55 -07:00

34 lines
997 B
C#

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