Selaa lähdekoodia

[unity] Fixed another occurrence of compile errors in Unity 2017.3 when enabling TK2D define due to asmdef files. See #1280.

Harald Csaszar 6 vuotta sitten
vanhempi
commit
d64decbe3d

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineEditorUtilities.cs

@@ -1852,12 +1852,12 @@ namespace Spine.Unity.Editor {
 
 			internal static void SetAsmdefFileActive(string filename, bool setActive) {
 
-				string typeSearchString = setActive ? " t:textasset" : " t:asmdef";
+				string typeSearchString = setActive ? " t:TextAsset" : " t:AssemblyDefinitionAsset";
 				string[] guids = AssetDatabase.FindAssets(filename + typeSearchString);
 				foreach (string guid in guids) {
 					string currentPath = AssetDatabase.GUIDToAssetPath(guid);
 					string targetPath = System.IO.Path.ChangeExtension(currentPath, setActive ? "asmdef" : "txt");
-					if (System.IO.File.Exists(currentPath)) {
+					if (System.IO.File.Exists(currentPath) && !System.IO.File.Exists(targetPath)) {
 						System.IO.File.Copy(currentPath, targetPath);
 						System.IO.File.Copy(currentPath + ".meta", targetPath + ".meta");
 					}