
Auto generation of UV coordinates for Meshes.Supports TexturePacker features (rotation.Why use the TexturePacker Unity Extension? Note: Some features are not available in the free version.TexturePacker will allow you to easily and quickly create texture atlases for your game. Why you should use texture atlases in your game: Using with GUI (drawing GUI textures from Atlas, GUI Animation).Using with 3D object’s (animation, automatic UV).To get started as quick as possible, here is Video Tutorials Section (will be upgraded shortly) Both have a limited function free version in addition to the full version. There are two different versions of TexturePacker – The stand alone TexturePacker, and the TexturePacker Unity Extension. This makes the player movement device independent.This is a tutorial on how to use the TexturePacker extension for Unity. ltatime gives the time interval in seconds from the last frame to the current one. Input.GetAxis takes input from the keyboard Rotate player when moving in the opposite direction disable Animator when no key is pressed Start is called before the first frame updateįloat posupdate= Input.GetAxis ("Horizontal") * ltaTime*2f In the code, you take the input from the keyboard and add it to the player position. Open the script and paste the below code.Go to the inspector window and click add component.Select the player in the hierarchy window.You can attach the script below to the player gameobject for moving the player with arrow keys. You can also select the Character sprite and increase the Pixel Per Unit value to make your character fit into the scene. Use the scale option in the inspector window to reduce the size of the Character. The Character is much larger than the background. That’s it, you have created your character animation.Ĭlick on the arrow on the Background-sprites PNG file Drag and drop your background sprites to create a simple environment. Unity will prompt you to make a new animation with these sprites. Drag and drop the Character sprites to the hierarchy window or scene window in Unity’s editor. png file.Ĭlick on the arrow on the Character-sprites PNG file and select all the sprites. Once the import is complete you can copy the sprite sheet into the You can exclude the example part from it if you want. In case of Unity 2021 you need to use the Package Manager to Import the asset. In Unity 2020 or previous versions you can download the TexturePacker Importer from the Unity Asset store. That’s why we’ve created a free Unity asset called TexturePacker Importer that automates the process for you. You would have to split the sprites manually if you just copy and paste the sprite sheet into Unity. I am using Unity 2021.1.13f1 for this tutorial. tpsheet extension.Ĭreate a new 2D project in Unity. One will be an image file (.png) and the other will be a data file with. You will get two files when you publish a sprite sheet. This algorithm is slower than MaxRects but allows you to pack more sprites on a single texture in many cases.Ĭlick Publish sprite sheet to generate and save your sprite sheet as “Background-sprites” and “Character-sprites”. I recommend that you use POT (Power of 2) whenever possible.Įxperiment with the packing by setting the Algorithm to Polygon.


To create smaller sprite sheets, set Size constraint to AnySize - but this will give you warnings in Unity about mipmap creation. You should see a preview of your sprite sheet in the center view.Add the character sprites to the character project and the background sprites to the background project. Drag and drop the folder containing your sprites onto the TexturePacker window.Create separate projects in TexturePacker for background and character sprite sheets and name them Character-sprite-sheet and Background-sprite-sheet by clicking Save project in the toolbar.We are going to use a background sprite sheet, and a character sprite sheet for our game.Set the Data format in the right panel to Unity - Texture2D sprite sheet.Using TexturePacker to make sprite sheetĭownload TexturePacker and install it on your computerįollow the steps below to make your sprite sheet In this tutorial, we will use TexturePacker to make a sprite sheet and use it in a simple Unity game scene. Import sprite sheet to Unity with TexturePacker Importer.Use TexturePacker to make sprite sheets.
