Skip to content

Commit

Permalink
#1 autosize fix (removed test part of code)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicloay committed Jan 30, 2014
1 parent b0c30a1 commit 8959c2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/UnitySpineImporter/Scripts/Editor/Util/SpineUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ static void fixTextureSize(string imagePath){
if (max > sizes[i] && max <= sizes[nextI] )
fitSize = sizes[nextI];
}

if (importer.maxTextureSize!=fitSize){
Debug.LogWarning("change default size to " + fitSize+ " for "+imagePath);
importer.maxTextureSize = fitSize;
}

foreach(string platform in platforms){
int maxTextureSize;
TextureImporterFormat textureFormat;
Expand All @@ -129,7 +131,6 @@ public static void updateImporters(SpineMultiatlas multiatlas, string directory,
Texture2D tex = AssetDatabase.LoadAssetAtPath(imagePath, typeof(Texture2D )) as Texture2D;
Vector2 atlasSize = new Vector2(tex.width, tex.height);
TextureImporter importer = TextureImporter.GetAtPath(imagePath) as TextureImporter;
importer.maxTextureSize = 2048;
importer.spritesheet = getSpriteMetadata(spineAtlas, atlasSize);
importer.textureType = TextureImporterType.Sprite;
importer.spriteImportMode = SpriteImportMode.Multiple;
Expand Down

0 comments on commit 8959c2d

Please sign in to comment.