

- Unity texturepacker sprite loses width and height how to#
- Unity texturepacker sprite loses width and height install#
- Unity texturepacker sprite loses width and height update#
- Unity texturepacker sprite loses width and height full#
- Unity texturepacker sprite loses width and height pro#
Data Format: This provides you the ability to select the format for your data files to match your game framework.Let’s quickly go through some of the new size and layout options on the Texture Settings bar: One of the many new features of Texture Packer is the ability to pull the settings off onto your desktop and have them float outside your work documents. Try dragging the entire Texture Settings bar – you’ll see that it can detach. There you can configure the output, geometry (size), and layout options for the sprite sheet. Ok, now take a look at the options on the left hand side. This means if you add more sprites to the folder, next time you run Texture Packer it will pick up any new sprites in the folder automatically – pretty handy!Īlso, note you don’t necessarily have to have all of your sprites in the same root folder, you could organize them in subfolders if you want (such as sprites/animals, sprites/monsters), and when retrieving them from Cocos2D you can refer to them by their relative path.įinally, note that you can include more than one folder of sprites if you want – this can be handy for larger games where you have the same items on multiple sprite sheets/levels. First, when you add sprites by folder like this, Texture Packer doesn’t add references to the individual sprites, it adds a reference to the folder. On the right hand side, you can see all of the images imported into Texture Atlas and click on each one to see the bounding box – another handy feature!Ī few notes about adding images using the Add Folder option, by the way. Texture Packer will load the images and intelligently lay them out within the sprite sheet as follows: Now, click the Add Folder button in the top toolbar and choose the TextureFun/TextureFun_Art/sprites folder.
Unity texturepacker sprite loses width and height pro#
Agree to the license prompt and when you see the first popup that appears, choose “Test Pro for 1 week” to continue.
Unity texturepacker sprite loses width and height install#
When you download the DMG, and open the package and agree to the license, drag the TexturePacker icon to the Applications folder and follow the prompts to install Texture Packer on your machine.Īfter you finish installing, click on Texture Packer in your Applications folder to run it.
Unity texturepacker sprite loses width and height full#
There is a lite version that will work for this tutorial but you will quickly see the advantages of this great tool and want to use the full featured version. The first thing you need to do is download a copy of Texture Packer. Ok, now that you have a project template and some sample art to work with, time to make a sprite sheet using Texture Packer! Creating a Sprite Sheet with Texture Packer Download this sample artwork I gathered together, and after you unzip it, drag the entire directory as a subfolder of your TextureFun project source code folder, as shown in the image below. Next, you’ll need some images to make the sprite sheets. Expand the dropdown and select only the last four files ( main.m, AppDelegate.m, HelloWorldLayer.m, and IntroLayer.m), then click Check and finish the steps of the wizard. Just go to Edit\Refactor\Convert to Objective-C ARC. You are going to use ARC in this project, but by default the template isn’t set up to use ARC. Once you’ve got that installed, start up Xcode and make a new project with the iOS\cocos2d v 2.x\cocos2D iOS template, and name the project TextureFun. So first make sure that you have the latest “unstable” version of Cocos2D v2.x installed.

Like I said, even though this is a Texture Packer tutorial, I wanted to show you an example of this working in an actual game, so we’ll be using Cocos2D for that. If you’re curious to learn more about Cocos2D, check out some of our other Cocos2D tutorials.

If you are new to Cocos2D, you can still follow along with this Texture Packer tutorial, but there may be some missing gaps in your knowledge about Cocos2D itself as the focus will be on TexturePacker.

Unity texturepacker sprite loses width and height how to#
This Texture Packer tutorial will show you how to use Texture Packer to create and optimize sprite sheets in your games, using a Cocos2D 2.X game as an example.Īlong the way, you’ll learn how to use pixel formats and Texture Packer wisely to make sure your games launch quickly, run smoothly, and use as little memory as possible – while still looking good! When making 2D games, it’s important to combine your sprites into large images called sprite sheets, in order to get the best performance for your games.Īnd Texture Packer is a great tool that makes it extremely easy to generate these sprite sheets – with the click of a button.
Unity texturepacker sprite loses width and height update#
Update : Fully updated for Cocos2D 2.1-rc0a, Texture Packer 3.07, and Modern Objective-C style (original post by Ray Wenderlich, update by Tony Dahbura). Optimize texture usage with Texture Packer and Pixel Formats!
