public void LegacySkinnedMeshAnimTest(string fbxPath) { fbxPath = FindPathInUnitTests(fbxPath); Assert.That(fbxPath, Is.Not.Null); // add fbx to scene GameObject originalGO = AddAssetToScene(fbxPath); // get clip AnimationClip animClipOriginal = originalGO.GetComponentInChildren <Animation>().clip; Assert.That(animClipOriginal, Is.Not.Null); // export fbx // get GameObject string filename = AssetDatabase.GetAssetPath(ExportToFbx(originalGO)); // TODO: Uni-34492 change importer settings of (newly exported model) // so that it's not resampled and it is legacy animation AnimTester.ConfigureImportSettings(filename); var animClipImported = AnimTester.GetClipFromFbx(filename); AnimTester.ClipTest(animClipOriginal, animClipImported); }
/// <summary> /// Compares the properties and curves of multiple animation clips /// </summary> /// <param name="animClipsOriginal">Animation clips original.</param> /// <param name="animClipsImported">Animation clips imported.</param> public static void MultiClipTest(AnimationClip[] animClipsOriginal, Dictionary <string, AnimationClip> animClipsImported) { Assert.That(animClipsImported.Count, Is.EqualTo(animClipsOriginal.Length)); foreach (var clip in animClipsOriginal) { Assert.That(animClipsImported.ContainsKey(clip.name)); var fbxClip = animClipsImported [clip.name]; AnimTester.ClipTest(clip, fbxClip); } }