talecrafter / AnimationImporter

Aseprite Animation Importer for Unity
613 stars 72 forks source link

Error when importing animation sheets that exceed Unity's max texture size #22

Open CatPawns opened 7 years ago

CatPawns commented 7 years ago

IOException: Sharing violation on path Assets/Editor/KnightModel.json System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:339) AnimationImporter.Aseprite.AsepriteImporter.CreateSpriteAtlasAndMetaFile (AnimationImporter.AnimationImportJob job) (at Assets/Editor/Assets/AnimationImporter/Aseprite/AsepriteImporter.cs:147) AnimationImporter.Aseprite.AsepriteImporter.Import (AnimationImporter.AnimationImportJob job, AnimationImporter.AnimationImporterSharedConfig config) (at Assets/Editor/Assets/AnimationImporter/Aseprite/AsepriteImporter.cs:53) AnimationImporter.AnimationImporter.ImportJob (AnimationImporter.AnimationImportJob job) (at Assets/Editor/Assets/AnimationImporter/AnimationImporter.cs:282) AnimationImporter.AnimationImporter.Import (AnimationImporter.AnimationImportJob[] jobs) (at Assets/Editor/Assets/AnimationImporter/AnimationImporter.cs:264)

The importer works fine with small animations, i am trying to import 600 frames File.

CatPawns commented 6 years ago

Later of testing seems like unity have a max texture size so if we exceed that limit there will be errors.

talecrafter commented 6 years ago

I changed the title to reflect that problem. But I'm a bit at loss here how to fix / handle this. Leaving this issue open until a solution comes to mind.

CatPawns commented 6 years ago

The only thing that comes to me its a auto slicer, check if the texture exceds max texture if that so slice it to avoid the problem and create animations from that. But this would require extra loggic to correct slice i think.