From 6c0753c3875eb9ca7fc90bdf91485920ac0ad3e8 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 3 Sep 2023 21:36:38 +0900 Subject: [PATCH] fixing unit test issues --- Editor/Animation/AnimatorCombiner.cs | 2 +- UnitTests~/TestBase.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/Animation/AnimatorCombiner.cs b/Editor/Animation/AnimatorCombiner.cs index c1cd236..6e6af04 100644 --- a/Editor/Animation/AnimatorCombiner.cs +++ b/Editor/Animation/AnimatorCombiner.cs @@ -419,7 +419,7 @@ Dictionary cloneMap cloneMap[original] = obj; - if (isSaved) + if (isSaved && _combined != null && EditorUtility.IsPersistent(_combined)) { AssetDatabase.AddObjectToAsset(obj, _combined); } diff --git a/UnitTests~/TestBase.cs b/UnitTests~/TestBase.cs index b5ba78e..4dac5e5 100644 --- a/UnitTests~/TestBase.cs +++ b/UnitTests~/TestBase.cs @@ -23,7 +23,7 @@ public virtual void Setup() if (_scriptToDirectory == null) { _scriptToDirectory = new Dictionary(); - foreach (var guid in AssetDatabase.FindAssets("t:MonoScript", new string[] { "Assets/UnitTests" })) + foreach (var guid in AssetDatabase.FindAssets("t:MonoScript", new string[] { "Packages/nadena.dev.ndmf/UnitTests" })) { var path = AssetDatabase.GUIDToAssetPath(guid); var obj = AssetDatabase.LoadAssetAtPath(path);