mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
efa263b551
* feat: add version defines for VRCSDK * chore: early return if VRCSDK project but not VRChat avatar
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
#if MA_VRCSDK3_AVATARS
|
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Immutable;
|
|
using System.Linq;
|
|
using modular_avatar_tests;
|
|
using nadena.dev.modular_avatar.core;
|
|
using nadena.dev.ndmf;
|
|
using NUnit.Framework;
|
|
using UnityEditor.Animations;
|
|
using UnityEngine;
|
|
using VRC.SDK3.Avatars.Components;
|
|
using AvatarProcessor = nadena.dev.modular_avatar.core.editor.AvatarProcessor;
|
|
|
|
public class PreexistingParamsTest : TestBase
|
|
{
|
|
[Test]
|
|
public void TestPreexistingParameterOverwritePolicy()
|
|
{
|
|
var prefab = CreatePrefab("PreexistingParamsTest.prefab");
|
|
AvatarProcessor.ProcessAvatar(prefab);
|
|
|
|
var parameters = ((AnimatorController)FindFxController(prefab).animatorController).parameters;
|
|
var paramDict = parameters.ToImmutableDictionary(p => p.name, p => p.defaultInt);
|
|
|
|
foreach (var kvp in paramDict)
|
|
{
|
|
if (kvp.Key == "default_override" || kvp.Key == "animator_only")
|
|
{
|
|
Assert.AreEqual(1, kvp.Value);
|
|
}
|
|
else
|
|
{
|
|
Assert.AreEqual(11, kvp.Value);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |