modular-avatar/Assets/_ModularAvatar/EditModeTests/Animation/MiscAnimationTests.cs
bd_ c9c9701e1d chore: unexpose animation context for now
This API is still a bit unstable; it'll probably be added in a future release.
2023-09-24 14:37:10 +09:00

27 lines
989 B
C#

using nadena.dev.ndmf;
using nadena.dev.modular_avatar.animation;
using NUnit.Framework;
using UnityEditor;
namespace modular_avatar_tests
{
public class MiscAnimationTests : TestBase
{
[Test]
public void HighQualityCurvesSettingPreserved()
{
var prefab = CreatePrefab("HighQualityCurvesSettingPreserved.prefab");
var context = new BuildContext(prefab, null);
context.ActivateExtensionContext<TrackObjectRenamesContext>();
context.DeactivateExtensionContext<TrackObjectRenamesContext>();
var layer = findFxLayer(prefab, "Base Layer");
var hq_on = FindStateInLayer(layer, "HQ_ON");
var hq_off = FindStateInLayer(layer, "HQ_OFF");
Assert.True(new SerializedObject(hq_on.motion).FindProperty("m_UseHighQualityCurve").boolValue);
Assert.False(new SerializedObject(hq_off.motion).FindProperty("m_UseHighQualityCurve").boolValue);
}
}
}