Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TexturePacker to Meshes Prefabs Importer

Discussion in 'Made With Unity' started by Fenrisul, Feb 5, 2013.

  1. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Hey all, I've attached my TexturePacker importer plugin under the MIT license.


    It can process the output of TexturePacker ( http://www.codeandweb.com/texturepacker ) and give back good old fashioned Prefabs and Meshes. There are a few other handy features.

    I wrote this a while ago but finally got around to cleaning it up enough to consider releasing properly. I use it all the time when working with 2D assets in Unity for tons of purposes including sprite-character animation to custom explosions and effects or HUD/GUI or decal meshes for bullet impact or labels on the side of buildings.

    Hope ya'll get some use out of it :) Feel free and drop some credits to me if you use this tool in a published project - not required but always appreciated.

    Cheers!

    *EDIT*
    I've updated the attached unitypackage to be compliant with the newer versions of TexturePacker.
     

    Attached Files:

    Last edited: Aug 28, 2013
  2. UnknownProfile

    UnknownProfile

    Joined:
    Jan 17, 2009
    Posts:
    2,311
    Oh? A texture packer? For free? Why, thank you.
     
  3. piluve

    piluve

    Joined:
    Mar 17, 2012
    Posts:
    158
    Nice contribution!

    See you!
     
  4. Andreas Loew

    Andreas Loew

    Joined:
    Feb 27, 2013
    Posts:
    17
    @fenrisul: Thanks for the importer. I would like to add a link to your video and the exporter to my tutorials section. http://www.codeandweb.com/texturepacker/tutorials

    Is it ok for you if I also make a blog post with your content (including credit and a link to here)?
     
  5. arutyunyan

    arutyunyan

    Joined:
    May 25, 2013
    Posts:
    2
    @fenrisul - great idea, but I doesn't get it working unfortunately in the latest Unity version. As I checked in the parser there is a wrong check on the TexturePacker URL ( www.texturepacker.com ) and in the actual sprite sheet it is now different ( like www.codeandweb.com ). I've tried to fix this manually, but doesn't get meshes generated nevertheless.
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    That's pretty awesome of you. Nice!
     
  7. SpinFall.com

    SpinFall.com

    Joined:
    Apr 16, 2013
    Posts:
    10
    Maybe a simple fix. The menu options are greyed out.
    Using Unity 4.1.5
    Using latest version of Texture Packer: TexturePacker(Pro) 3.1.2

    $texturepacker.png
     
    Last edited: Aug 13, 2013
  8. gruddlebug

    gruddlebug

    Joined:
    Mar 11, 2013
    Posts:
    65
    @arutyunyan SpinFall.com

    Change the URL in line 41 of TexturePacker.cs to:

    "http://www.codeandweb.com/texturepacker " - INCLUDING the trailing space

    and all is well


    Cheers

    Paul
     
  9. SpinFall.com

    SpinFall.com

    Joined:
    Apr 16, 2013
    Posts:
    10
    Ah ha! Thanks!!!
     
  10. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    I've updated the attached package to just ignore the app name itself and only look for the existance of the meta["app"] entry because why not...you know what you're importing anyway.
     
  11. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
  12. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Cool :) glad to see some folks using this even though the Sprites system is around now heh. Thanks for updating it.
     
  13. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    The reason why I wrote it, is that if you don't have the pro version of Unity you can not use the integrated Sprite Packer. For all those users who use the free version of Unity still need the script to import the atlas from TexturePacker.
    That is the reason why I updated it.
    I know there is the automatic slice function in the sprite editor, but if you have the exact information available why you should not use them?

    If you'e using compressed textures (like png) the automatic slice function isn't working....
     
  14. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    Yea, I've been noticing how limited the sprite system for Indie is... I've got my pro license, but when I went to teach someone who was interested on a fresh indie install of 4.3.1 i was really I was really not expecting to *not* have the sprite packing feature... it just doesn't feel like an "Pro" feature as most game free game packages have at least some form of packing... The trimming / cutting of meshes ok fine I can see that, but just an atlas maker? o_O I probably would've gotten around to updating this if you didn't already do it :) Wanna implement some mesh trimming too w/ me sometime?
     
  15. Hatsch

    Hatsch

    Joined:
    Dec 14, 2013
    Posts:
    10
    Yeah why not ;) I'm always looking forward to learn something new.

    At the moment Unity in general is new to me, but it's kind of fun to explore it more and more...
     
  16. neigaard

    neigaard

    Joined:
    May 23, 2014
    Posts:
    24
    I am trying to get the TexturePacker plugin working in Unity 4.3, all I do is import it from the Asset Store into my project, but I do not have the TexturePacker menu options anywhere. What am I doing wrong?
     
  17. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    The TexturePacker plugin from the AssetStore is not related to this package.


    Please see this thread:
    http://forum.unity3d.com/threads/217408-TexturePacker-to-Sprite