Search Unity

TexturePacker to Sprite

Discussion in '2D' started by Hatsch, Dec 14, 2013.

  1. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    Texture Packer Importer

    If you watch the video, you see, that if you are clicking on an atlas you have two options:
    * Process to Mesh
    * Process to Prefab

    For the new introduced texture type "Sprite" in Unity 4.3 I wrote a third import option, which is called "Process to Sprites".
    Your find the script in the attachments ( View attachment 78663 ).

    This will import sprites from your atlas file (which was generated by the Texture Packer), set the texture to texture type "sprite" and sprite mode to "multiple".

    Example:

    Go to the atlas file -> right click -> TexturePacker -> Process to Sprites
    $ProcessToSprites.png

    After the script has finished you will see something like this.
    $Result.PNG
     

    Attached Files:

    Last edited: Dec 17, 2013
  2. abstractron

    abstractron

    Joined:
    May 3, 2013
    Posts:
    1
    Was baffled seeing this with no responses, but it just so happens you put it up a few hours ago. Just started getting into 2D today, carrying a whole bunch of TexturePacker atlases/sheets from my previous 2D work in Starling. Thank you for thinking of this!

    One thing however, does the atlas need to be in a certain format for the menu items to become usable? I have XML (blech) atlases that I have no problem reconfiguring if it makes this work. Also, thanks for reminding me that I had a pro license for TexturePacker up until this past September!

    Fake Edit: Just watched the video, and yeah JSON is most certainly the way to go. Will report back when I've made some progress. :)
     
  3. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    Yeah, I was also baffled that no one else has wrote it before....

    The atlas must have following format:

    Code (csharp):
    1. {
    2.     "frames":
    3.     {
    4.  
    5.         "frame1":
    6.         {
    7.             "frame": {"x":2,"y":2,"w":866,"h":718},
    8.             "rotated": false,
    9.             "trimmed": false,
    10.             "spriteSourceSize": {"x":0,"y":0,"w":866,"h":718},
    11.             "sourceSize": {"w":866,"h":718}
    12.         },
    13.        
    14.         "frame2": { ... },
    15.         ...
    16.     },
    17.     "meta":
    18.     {
    19.         "app": "http://www.codeandweb.com/texturepacker ",
    20.         "version": "1.0",
    21.         "image": "menuIcons.png",
    22.         "format": "RGBA8888",
    23.         "size": {"w":1024,"h":2048},
    24.         "scale": "1",
    25.         "smartupdate": ""
    26.     }
    27. }
    28.  
    TexturePacker creates this file for you.

    If you have an other format from other programs you have to write your on parser. But this is not difficult, basically you have to do following:

    Code (csharp):
    1.  
    2.         TextAsset txt = (TextAsset)Selection.activeObject;
    3.  
    4.         string rootPath = Path.GetDirectoryName(AssetDatabase.GetAssetPath(txt));
    5.  
    6.         List<SpriteMetaData> sprites = TexturePacker.ProcessToSprites(txt.text);
    7.  
    8.         string path = rootPath + "/" + meta.image;
    9.         TextureImporter texImp = AssetImporter.GetAtPath(path) as TextureImporter;              
    10.  
    11.                //load texture, and assign sprites
    12.         texImp.spritesheet = sprites.ToArray();
    13.         texImp.textureType = TextureImporterType.Sprite;
    14.         texImp.spriteImportMode =SpriteImportMode.Multiple;
    15.  
    16.         AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate );
    17.  
    Sprites is a list of SpiteMetaData. Here some pseudo code:

    Code (csharp):
    1.  
    2. public static List<SpriteMetaData> ProcessToSprites(string text) {
    3.  
    4. .... parse XML ...
    5.  
    6.     List<SpriteMetaData> sprites = List<SpriteMetaData>();
    7.  
    8.     foreach (var sprite in xmlFile) {
    9.         SpriteMetaData smd = new SpriteMetaData();
    10.         smd.rect = new Rect(x,y,with,height);
    11.         smd.alignment =  1;
    12.         smd.name = name;
    13.         smd.pivot = new Rect(x,y);
    14.  
    15.         sprites.Add(smd);
    16.     }
    17.  
    18.     return sprites;
    19. }
    20.  
    That's all ;)
     
  4. adentutton

    adentutton

    Joined:
    Mar 24, 2013
    Posts:
    34
    Hi

    Just got my hands on TexturePacker as a beginner to all of this!

    Tried to follow the instructions above but got the following error?

    View attachment $error.psd
     

    Attached Files:

  5. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    thanks for the share , I wrote similar things but ended up not be able to edit directly on current made SpriteMetaData, so I ended up write on sprite metafile directly.

    Look like create the list from scratch work
     
  6. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    The screen shot tells me that the error occurs on this line

    Code (csharp):
    1.  
    2. AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate );
    3.  
    Unity is trying to update the texture, but if there are some invalid values it throws an error. I was able to reproduce this exception by changing the width of a frame to a too large value in the atlas file.

    Code (csharp):
    1.  
    2. "easy.png":
    3. {
    4.     "frame": {"x":2,"y":722,"w":3283,"h":286},  <------- Sprite is outside of the texture
    5.     "rotated": false,
    6.     "trimmed": false,
    7.     "spriteSourceSize": {"x":0,"y":0,"w":283,"h":286},    
    8.     "sourceSize": {"w":283,"h":286}
    9. },
    10.  
    I updated the script, now it is checking if the sprite is inside the texture. If not, there will be a warning on the console.

    Please update the script and try again! If it is still not working you can post your atlas file and I will have a look at it.
     
    Last edited: Dec 21, 2013
  7. Philtho

    Philtho

    Joined:
    Dec 18, 2013
    Posts:
    16
    Thumbs up for this and the video!
     
  8. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    I took this package and it's predecessor and have created a repo on GitHub and have faked the history with the original commit by Mitch Thompson and then the contribution by Harald Lurger.

    I plan to add some more tests as I believe their is at least one bug in the current implementation. I am not sure what is the best way to distribute the .unitypackage file, I don't really feel like checking in the package itself. If you clone the repo you can run:

    Hopefully having the package on GitHub will help other people to contribute. Also, who likes having to hunt through YouTube comments for the latest version of a plug-in. :D

    https://github.com/haysclark/unity3d-texturepackerimporter
     
    Last edited: Dec 27, 2013
  9. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618

    Thanks for getting that up n' running :) I've been a bit too busy to keep it updated heh. I'll probably contribute a bit more before global gamejam 2014 starts - maybe even some sprite trimming/slicing like the sprite features in Unity Pro.

    --mitch
     
  10. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    No problem. :D I am making some minor tweaks to 'Process > Sprites'. It loses the JSON files sorting so I am doing a post sort which should match the order that TexturePacker uses. Eventually I might add some more UnitTests. It's a bit more complex then I realized to get C# working on Travis-CI, and almost all of Unity needs to be mocked which is a lot of work. :D

    I think the only problem right now with the Toolset is that is that 'Process > Sprites' does not support all the features that 'Process > Meshes' and 'Process > Prefabs' support, so it's a bit confusing to users.
     
  11. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    So I'm back again ;) Thank you to put the code on github. Great idea!

    .unitypackage

    The best way would to put it on the asset store, but I am not sure if we can create an account where every contributor can update the package.
    So I think it is better to put it on github so I don't have to update my original post always...

    Missing features

    Which features are you missing exactly? Currently I have a little bit of time over, so I could add some features.
     
  12. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    I just found this today (getting into Unity's 3D stuff) and this gem was a Godsend. Thanks for sharing it. Wonderful bit of utility.

    Ever in NYC...beers are on me.
    B.
     
  13. iamallama

    iamallama

    Joined:
    Jan 4, 2014
    Posts:
    5
    Great work guys. I am new to unity and this helps a ton. Any chance of getting trim to work?
     
  14. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Thank you, everyone, especially OP.
     
  15. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
    I'm trying to use the importer, but i can't import my sprites with the pivot point centered, it's always "Top Left".

    I found this line of code:
    Code (csharp):
    1. smd.pivot = this.frame.center;
    But for me it's not working, or im doing something wrong :)

    How i can import my sprites with pivot centered??

    Thanks
     
  16. Gamer_Woods

    Gamer_Woods

    Joined:
    Jan 31, 2013
    Posts:
    33
  17. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
  18. seriousGeorge

    seriousGeorge

    Joined:
    Dec 17, 2013
    Posts:
    24
    I'm using the script from post#1, its working fine in editor but I'm getting errors on build:

    Assets/TexturePacker/Plugins/TexturePacker.cs(15,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    Assets/TexturePacker/Plugins/TexturePacker.cs(217,28): error CS0246: The type or namespace name `SpriteMetaData' could not be found. Are you missing a using directive or an assembly reference?
    Assets/TexturePacker/Plugins/TexturePacker.cs(162,24): error CS0246: The type or namespace name `SpriteMetaData' could not be found. Are you missing a using directive or an assembly reference?
    Assets/TexturePacker/Plugins/TexturePacker.cs(15,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?



    Edit: ok, figured it out. I put it all inside another "Editor" Folder and all is good.


    Building an unitypackage?
    Also I downloaded the current github repository but I frankly do not know how to make an unitypackage out of that?
     
    Last edited: Feb 4, 2014
  19. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    Sorry for being away for so long, I forgot to subscribe to this thread. I hope to do some investigation for both StrangeIoC and my version of the TexturePacker Importer and integrating them into the Unity Store. I don't like the idea of filling up my repo with binary files like 'unitypackage'; however, what might work well is exporting the binary to a GitHub Gist which user can easily download.

    -h
     
  20. tobln

    tobln

    Joined:
    Jul 5, 2013
    Posts:
    5
    hey guys, i used the texture packer import workflow and really liked the result until my graphic artist decided to delete some graphics from the atlas which were not used. The result, all SpriteRenderers lost the correct reference to the matching sprite because the Sprites are referenced by the id (order) in the multiatlas instead the name (what would make much more sense)

    This makes the whole workflow somehow useless because you can never delete an graphic again and also adding new requires an distinct Sprite order with number prefix (01_, 02_, ..)

    Or did i missed something and there is a solution?
     
  21. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    Nope you didn't miss something - This is how it is. It's not so bad, just requires some foresight; if your adding sprites to the sheet, make sure in the TXT file it outputs, that the new frames are after the old ones, and I believe you can even move them in the text file. I wonder if this can be fixed? I admit I have not delved into the code behind this script at all.
     
  22. NicolasHognon

    NicolasHognon

    Joined:
    Nov 15, 2010
    Posts:
    32
    Hello everyone ... thanks for sharing your code.

    I have got a question about rotation support in TexturePacker. The plugin seems to support sprite rotation in TexturePacker but when I enable it the result is not ok in Unity3D. Does I missed something ?

    More over I am working on an improvement of the plugin to restore sprite pivot when atlas is updated (I will share the code if my test are ok).
     
  23. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    I usually go with no rotation to avoid problems.

    That would be amazing, can't wait!
     
  24. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    Per "TexturePacker -> Sprites", the last time I checked Unity 2D does not support rotated source coordinated for 2d sprites. :(
     
    Last edited: Feb 22, 2014
  25. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    Hi seriousGeorge,

    Sorry that it wasn't easy to get the package. Right now my GitHub repo only has a shell script for OSX users to build the unitypackage file. I might add a .bat file for Windows users if I have the free time. I uploaded the .unitypackage file to GitHub.io and posted a link in the readme. I hope this helps people that get stuck!

    TexturePackerImporter.unitypackage

    For the code see GitHub

    -Cheers,
    Hays
     
    Last edited: Feb 22, 2014
  26. TehOne

    TehOne

    Joined:
    Feb 20, 2014
    Posts:
    3
    First of all, thanks for this package, it is a life saver.

    Now, on to a problem. When I tried to build and run my game I got this error: "Assets/TexturePacker/Plugins/TexturePacker.cs(15,7): error CS0246: The type or namespace name `UnityEditor' could not be found.". I solved it by moving the TexturePacker/Plugins folder to TexturePacker/Editor/Plugins.
     
  27. NicolasHognon

    NicolasHognon

    Joined:
    Nov 15, 2010
    Posts:
    32
    I am testing some improvement using the source code from https://github.com/haysclark/unity3d-texturepackerimporter.
    The idea is when you update an atlas
    - saving pivot if you manually modify them using the sprite editor in unity
    - manage removing/adding sprites. too manage the fact sprite are referecing index in the atlas when you remove a sprite I keep an "empty/null" sprite and when you add new ones their appended.

    I have not finished all my test but here the code.

    In TexturePacker.cs

    Code (csharp):
    1.  
    2.     public static List<SpriteMetaData> ProcessToSprites(string text, SpriteMetaData[] spritesSheet) {
    3.         Hashtable table = text.hashtableFromJson();
    4.         MetaData meta = new MetaData((Hashtable)table["meta"]);
    5.         Hashtable frameTable = (Hashtable)table["frames"];
    6.  
    7.         List<PackedFrame> frames = new List<PackedFrame>();
    8.         foreach(DictionaryEntry entry in frameTable) {
    9.             frames.Add(new PackedFrame((string)entry.Key, meta.size, (Hashtable)entry.Value));
    10.         }
    11.         alphabatizeFramesByName( frames );
    12.  
    13.         List<SpriteMetaData> sprites = new List<SpriteMetaData>();
    14.         for(int i = 0; i < frames.Count; i++){
    15.             SpriteMetaData smd = frames[i].BuildBasicSprite( 0.01f, new Color32(128,128,128,128));
    16.             if(smd.name.Equals("IGNORE_SPRITE")) {
    17.                 continue;
    18.             }
    19.             if (spritesSheet!=null) {
    20.                 bool found = false;
    21.                 foreach(SpriteMetaData oldsmd in spritesSheet) {
    22.                     if (oldsmd.name.Equals(smd.name)) {
    23.                         found = true;
    24.                         if (oldsmd.rect.width==smd.rect.width  oldsmd.rect.height==smd.rect.height) {
    25.                             smd.alignment = oldsmd.alignment;
    26.                             smd.pivot = oldsmd.pivot;
    27.                         }  else {
    28.                             Debug.LogWarning("Sprite pivot cannot be restored:" + smd.name + " [" + oldsmd.alignment + ":" + oldsmd.pivot + "] [" + smd.alignment + ":" + smd.pivot + "]");
    29.                         }
    30.                         break;
    31.                     }
    32.                 }
    33.                 if (spritesSheet.Length>0  !found) {
    34.                     Debug.LogWarning("Sprite has been removed:" + smd.name);
    35.                 }
    36.             }
    37.             sprites.Add(smd);
    38.         }
    39.  
    40.         if (spritesSheet!=null  spritesSheet.Length>0) {
    41.             List<SpriteMetaData> sprites2 = new List<SpriteMetaData>();
    42.             // TODO add dialog ?
    43.             foreach(SpriteMetaData oldsmd in spritesSheet) {
    44.                 bool found = false;
    45.                 int idx = 0;
    46.                 bool nullsmd = oldsmd.name.StartsWith(kNullPrefix);
    47.                 foreach(SpriteMetaData smd in sprites) {
    48.                     if (oldsmd.name.Equals(smd.name) || (nullsmd  oldsmd.name.Equals(kNullPrefix+smd.name))) {
    49.                         sprites2.Add (smd);
    50.                         found = true;
    51.                         break;
    52.                     }
    53.                     idx++;
    54.                 }
    55.                 if (!found) {
    56.                     SpriteMetaData fakesmd = new SpriteMetaData();
    57.                     fakesmd.name = nullsmd?oldsmd.name:kNullPrefix+oldsmd.name;
    58.                     sprites2.Add (fakesmd);
    59.                 } else {
    60.                     sprites.RemoveAt(idx);
    61.                 }
    62.             }
    63.             sprites2.AddRange(sprites);
    64.             sprites.Clear();
    65.             sprites.AddRange (sprites2);
    66.         }
    67.  
    68.         return sprites;
    69.     }
    70.  
    and in TexturePackerImport.cs

    Code (csharp):
    1.  
    2. static void ProcessToSprite(){
    3.         TextAsset txt = (TextAsset)Selection.activeObject;
    4.  
    5.         string rootPath = Path.GetDirectoryName(AssetDatabase.GetAssetPath(txt));
    6.         TexturePacker.MetaData meta = TexturePacker.GetMetaData(txt.text);
    7.  
    8.         string path = rootPath + "/" + meta.image;
    9.         TextureImporter texImp = AssetImporter.GetAtPath(path) as TextureImporter;
    10.  
    11.         List<SpriteMetaData> sprites = TexturePacker.ProcessToSprites(txt.text,texImp.spritesheet);
    12.  
    13.         texImp.spritesheet = sprites.ToArray();
    14.         texImp.textureType = TextureImporterType.Sprite;
    15.         texImp.spriteImportMode = SpriteImportMode.Multiple;
    16.  
    17.         AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate );
    18.     }
    19.  
    hope it help.
     
    Last edited: Feb 28, 2014
  28. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    Great job Nicolas! I will probably check this out today!
     
  29. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    Thanks Nicolas! I can't take much credit for the code and I have honestly only been utilizing the Texture Packer -> Sprite flow. Feel free to 'fork' my GitHub repo and then shoot me a pull request. :D I don't mind grabbing your update but this is what GitHub is meant to do!

    Feel free to post issues with the library in GitHub as well!
    Here is the link: https://github.com/haysclark/unity3d-texturepackerimporter/issues

    Cheers,
    Hays
     
    Last edited: Mar 1, 2014
  30. NicolasHognon

    NicolasHognon

    Joined:
    Nov 15, 2010
    Posts:
    32
  31. Omita

    Omita

    Joined:
    Dec 25, 2013
    Posts:
    11
    Will take a look soon. Been wrapping up some stuff for work yesterday and today.
     
  32. leonardozimbres

    leonardozimbres

    Joined:
    Jul 9, 2012
    Posts:
    29
    Hum... I'm new to Unity and... loved to see that there are already trimmed sprites!
    But there's one thing that bugs me. How animated sprites are doing?
     
  33. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    Hey guys in case you didn't see it, the 3/28 update of Texture Packer includes a new Data format Unity - Texture2D spritesheet along with a new native Unity plugin @ https://www.assetstore.unity3d.com/#/content/16641

    It works really well from what I can tell, so just thought I would pass it on!
     
  34. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    Yup it's nice, but it doesn't let you modifiy any pivot point inside Unity yet.
     
  35. autolame

    autolame

    Joined:
    Oct 9, 2013
    Posts:
    3
    Hi there,

    i've been working recently on a 2D Animation Pipeline and did come out with this simple Solution for importing animated SpriteSheet into Unity.
    I'm gladly sharing it with you: https://github.com/autolame/TexturePackerExtended

    Note: I have a little Extra built in to let you change the Pivot of the non-animated Sprites if you do use SpriteSheets for other Assets. Hope you like it :)
     
  36. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    What does "Process to Animation" do differently exactly?
     
  37. autolame

    autolame

    Joined:
    Oct 9, 2013
    Posts:
    3
    Well it offsets the pivots of the Sprites based on the source size of the original animation so you can use the Trim function in TexturePacker without worrying about its looking jumpy or erratic.

    $pinkypie.gif

    LEFT: Process to Sprites > Pivots: Center
    RIGHT: Process to Animation
    NOTE: Both animation are from same spritesheet with Trim ON

    I have attached the sample SpriteSheet so you can test it yourself.
    Note that this SpriteSheet is exported from a Flash Animation (.swf) using TexturePacker

    View attachment $pinkiepie.zip

    and sorry for the poor quality of the GIF
     
  38. FamerJoe

    FamerJoe

    Joined:
    Dec 21, 2013
    Posts:
    193
    Nice. This is based off the community texturepackerimporter, not the official asset though huh?
     
  39. autolame

    autolame

    Joined:
    Oct 9, 2013
    Posts:
    3
    Yep its based on the community texture packer importer. You can always change the pivots in the SpriteEditor after importing with the script.
    And sorry for the misleading name. It should be like "Process to Animated Sprites". I'll update that on Git.

    UPDATE: Edited the option as mentioned above so its now less misleading.
     
    Last edited: May 10, 2014
  40. TomasJ

    TomasJ

    Joined:
    Sep 26, 2010
    Posts:
    256
    Great work guys. Nice to see popular tools integrate so well with Unity.

    Curious though what are the benefits of this workflow versus our built-in packing? Maybe something we can improve in that area?
     
  41. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    I think the obvious one is that it can be used with the Unity Free edition :)
     
  42. TomasJ

    TomasJ

    Joined:
    Sep 26, 2010
    Posts:
    256
    Touché
     
  43. gorotoro

    gorotoro

    Joined:
    Nov 14, 2013
    Posts:
    10
    Is this a good place to post my question?:

    Just grabbed TexturePacker yesterday, and used it to create a sprite sheet. Works great, spit it out at the size I needed, which is 4096x4096.

    I import it into Unity3D, and do the slicing and all that, and it works just fine, EXCEPT...when I look at the sprite sheet in the Assets folder, I see it has been resized to 1024x1024, thus making my art look like crap.

    Would there be any reason why Unity is resizing my sprite sheet without my asking it to? Also, I never get the extended right-click menu at all, and I have the TexturePacker plug-in installed into Unity.

    Thanks in advance,
     
  44. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    Yup
    If you click on your atlas texture, you will see in the inspector a parameter called "Max Size" which is 1024 by default
     
  45. gorotoro

    gorotoro

    Joined:
    Nov 14, 2013
    Posts:
    10
    That's the weird thing, it's set to Max Size 4096!

    EDIT: Woops! iPhone settings were 1024 max. My bad.
    :oops:
     
    Last edited: May 17, 2014
  46. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    Since I can't pm you or mail you, please mail me to be able to help you since I need more informations
     
  47. gorotoro

    gorotoro

    Joined:
    Nov 14, 2013
    Posts:
    10
    It's cool, your tip was right. I didn't check the iPhone tab for the max size. Thanks!
     
  48. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Hi TomasJ.

    I wrote the original source for this package because I had a massive number of Cocos2D projects and other already-prepped assets show up with sprite sheets that needed converting into Unity (Unity 2.x so iOS 1.5 and Unity 3 eventually). Hopefully Unity3D's built in texture packer will offer similar results for Unity Indie eventually, but even for pro features it offers no support for existing sprite sheets being imported without a great deal of labor. It is very easy to tightly integrate TexturePacker's CLI mode to batch process hundreds of existing project files and prepare them for Unity-ization.

    Additionally, it is easy to append features to this importer than Unity Sprites simply cannot accomplish. In my case, I added a "Attach Shadow Mesh" option which prepends (draw-order safe) and rotates the sprite mesh 90 degrees and vertex color's it so it loses all color information and turns half opaque. This method is great for all sorts of things - but most of all it gives a good gateway into custom-coding whatever you need. Unity is now and will likely always be not as fine-grained as that because that's not really the goal heh; I've walked that line with Unity team before going as far as assisting in improving features via beta list and private work with the mobile team.

    I guess the biggest thing for me that the Unity packer doesn't do is output modifiable Mesh assets.

    Anyway

    Cheers, let me know if you want some more input on the current sprite systems.
     
    Last edited: May 27, 2014
  49. RDeluxe

    RDeluxe

    Joined:
    Sep 29, 2013
    Posts:
    117
    The smart folder feature is pretty cool too, considering our team has a huge folder tree to keep everything clean.
     
  50. sooonism

    sooonism

    Joined:
    Oct 14, 2013
    Posts:
    5
    Why do I get grayout for TexturePacker -> Process to Sprites, Process to Meshes, Process to Prefabs? I tried the suggestion from here about changing the URL to "http://www.codeandweb.com/texturepacker " but still did not work. Anything else that I missed out? Thanks!