Эх сурвалжийг харах

[unity] Minor bugfixes regarding Spine texture atlas importer reference assets. See #1524.

Harald Csaszar 5 жил өмнө
parent
commit
6d3e63acf7

+ 2 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs

@@ -594,7 +594,7 @@ namespace Spine.Unity.Editor {
 		static bool SetReferenceTextureSettings (string texturePath, SpineAtlasAsset atlasAsset, string referenceAssetPath) {
 			TextureImporter reference = TextureImporter.GetAtPath(referenceAssetPath) as TextureImporter;
 			if (reference == null)
-				SetDefaultTextureSettings(texturePath, atlasAsset);
+				return SetDefaultTextureSettings(texturePath, atlasAsset);
 
 			TextureImporter texImporter = (TextureImporter)TextureImporter.GetAtPath(texturePath);
 			if (texImporter == null) {
@@ -612,6 +612,7 @@ namespace Spine.Unity.Editor {
 			texImporter.isReadable = reference.isReadable;
 			texImporter.filterMode = reference.filterMode;
 			texImporter.mipmapFilter = reference.mipmapFilter;
+			texImporter.textureType = reference.textureType;
 
 			EditorUtility.SetDirty(texImporter);
 			AssetDatabase.ImportAsset(texturePath);