Since the integrated sprite packer is for the pro version only i have decided to write my own little sprite packer to ease my workflow and so i decided to share it with the community. It’s really simple and easy to use.
I haven’t yet tested it fully but i hope you guys post some feedback and maybe some improvement suggestions.
I think i tracked down the problem, you can re-download the package and test it out.
After reading the documentation of SetPixels i noticed the texture we are setting the pixels must be ARGB32 format and in the script i did not specified the TextureFormat… So i think that was the problem.
Edit: When i think of it, it might be the GetPixels that’s failing and not the SetPixels…
Edit again: Might be cause i used Sprite.rect for the new texture size and Sprite.textureRect for the pixel extraction…
Edit again: It’s been fixed, Sprite.textureRect was the problem and the fix was to use Sprite.rect instead.
My Unity is crashing every time I try to create a Sprite Packer, I’m using it on Mac btw.
Just a question though, let’s say I have a texture with 4 sprites, when I create the atlas using this tool, will the Sprite Renderers reference the sprites on the new atlas? without me having to do it manually?
A. I dont have access to a Mac, maybe you could post the Editor.log from the crash?
B. No, currently it does not replace references… But i could script that real easy : ]
I tested it on another machine and it worked perfectly. That replacing tool is amazing, but is it possible to replace the sprites in all scenes? or let the user choose the scenes? Because atm is either the current scene or the project, and in a project like mine which has a lot of scenes (100+), I have to go through all of them and use the replace tool.
Well, the contents of the scene are not available till the scene is loaded, so maybe if i made the tool load each scene and replace the sprites it could work… I’ll give it a try today. : ]