

Unity texturepacker for free#
Which you can download from the Unity Asset Store for free : TexturePacker Importer
Unity texturepacker install#
To enable the import of TexturePacker sprite sheets in Unity, you have to install TexturePacker Importer, That decreasing the overdraw by additional 2% comes with more than duplicating the vertex count. Keep an eye on the values TexturePacker is displaying at the bottom of the sprite sheet. If your project is high on graphics (GPU) but you still have some resources on the CPU side go for a lower overdraw If your project is high on computation (CPU) but you still have some resources on the GPU side go for a lower vertex count On the other hand: Each additional pixel adds work load on the GPU.

The best value for your project depends on 1 factors: Your CPU usage and GPU usage.

You can influence the quality of the meshes using Tracer Tolerance. Use MaxRects - TexturePacker uses rectangles for packing but still uses the optimized meshesįinally press Publish to create the sprite sheet.Increase the Tracer Tolerance - this will create less complex polygons.Polygon packing is a complex process and takes some time. You could also try MaxRects when packing polygon sprites, it might deliver better packing results depending on your sprite data. It also works well with UI.Image but you have to set useSpriteMesh to true. TexturePacker 4's default packing Algorithm is Polygon. Select the Data format Unity - Texture2d from the settings on the right side.Ĭlick on the folder icon next to Data file name and choose a location in the Assets directory of your Unity project - the TexturePackerImporter script will re-import the sprite sheet into your project each time you publish an updated sheet with TexturePacker. New sprites in the directory are added to the sheet as soon as you re-enter TexturePacker. TexturePacker preserves the directory structure under the directory you added - allowing you to group and sort sprites. To create a new sprite sheet, simply start TexturePacker and drag & drop the directoriesĬontaining your sprites to the Sprites area.
Unity texturepacker code#
No additional runtime code or library required.Increased performance through optimized sprite meshes.Sprites are accessible through Unity's standard API using the Sprite class - no additional runtime code required ! The sprite sheets also work with Unity's UI classes but don't support the optimized sprite meshes. TexturePacker, together with the free TexturePackerImporter, creates sprite sheet assets that can be directly used from Unity's What you are going to learn in this tutorial Overdraw reduced by 30% - giving you additional GPU power.Triangle count reduced by 69% - giving you additional CPU power.TexturePacker comes with a new algorithm to create better meshes. The only problem is the quality of the generated mesh: Unity creates sprite meshes for you - they reduce the amount of overdraw by simply not drawing I guess that you already know that sprite sheets increase the performance of your game. Simplify your sprites workflow in Unity.Create your sprite sheet and load it into Unity.Prepare your Unity project to read TexturePacker sprite sheets.This tutorial describes how you can use TexturePacker to create sprite sheets for Unity's 2D extension.
