modular-avatar/UnitTests~/MergeDBT/MergeDirectBlendTreeTests.cs
kaikoga efa263b551
chore: Fix non-VRChat support (for MA 1.10.5) (#1324)
* feat: add version defines for VRCSDK

* chore: early return if VRCSDK project but not VRChat avatar
2024-10-27 10:06:35 -07:00

30 lines
814 B
C#

#if MA_VRCSDK3_AVATARS
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using modular_avatar_tests;
using nadena.dev.ndmf;
using NUnit.Framework;
using UnityEditor.Animations;
using UnityEngine;
public class MergeDirectBlendTreeTests : TestBase
{
[Test]
public void DoesNotOverwriteBaseParameters()
{
var prefab = CreatePrefab("DBT_DoesNotOverwriteParameters.prefab");
AvatarProcessor.ProcessAvatar(prefab);
var fx = FindFxController(prefab);
var ac = (AnimatorController)fx.animatorController;
var parameters = ac.parameters.ToImmutableDictionary(i => i.name, i => i.defaultFloat);
Assert.AreEqual(123, parameters["ABC"]);
Assert.AreEqual(0, parameters["DEF"]);
}
}
#endif