Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by James_DollaSign · Apr 21, 2014 at 05:37 PM · sprite sheet

How do I create a sprite sheet for a 2D character?

I am trying to create a 2D game in UNITY and I am trying to create sprite sheets for the characters in my game right now. I was wondering if anyone can show me to videos or walkthroughs that show how to create sprite sheets for characters? I was thinking it would involve Adobe Photoshop or Illustrator, right? And then I can import the sprite sheet into UNITY when I finish making it?

Anyways, if someone could please explain how to create a sprite sheet for a 2D character using Adobe Illustrator or Photoshop, that would be really appreciated!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
8

Answer by gfoot · Apr 21, 2014 at 08:42 PM

Here's a quick guide to the basics of creating a multi-sprite image and importing it into Unity.

Create the image

I use Gimp for this, but any decent 2D art tool should be fine.

Start with a totally-transparent image. Draw your various sprites in non-overlapping regions on top of the transparency. You can lay them out however you like, it doesn't matter if you leave huge gaps between the sprites for now, and you don't have to align them to a grid or anything like that if you don't want to.

Save the final image as a PNG or some other file format that supports transparency and is understood by Unity.

Set up the sprite sheet in Unity

Select the image in the Project tab in Unity, then look in the Inspector. Set its "Texture Type" to "Sprite", and then set its "Sprite Mode" to "Multiple". Then press the "Sprite Editor" button that appears a few options lower in the Inspector.

In the sprite editor, press the "Slice" button in the top left corner. The default options are pretty good - it will automatically figure out which parts of the image correspond to distinct sprites. You can then click on a region to select it, and give it a name using the pop-up box in the lower right corner of the sprite editor. You can also move the box around, to add padding around the sprite, or to make it be a fixed size and to ensure that your graphics are centred correctly.

When you're done, press the "Apply" button in the top right of the sprite editor window. Now in the Project tab you can expand your sprite sheet out, and see the "child" sprites. You then use the child sprites just as if they were separate image files in the first place, e.g. by dragging them into the 2D view to create Sprite gameobjects.

Grid slicing

An alternative you should be aware of is using grid slicing. This works well if your sprites are all a fixed size, e.g. 64x64. You can then draw them in properly-aligned grid cells in your art tool, and Unity will slice your spritesheet according to the size you specify, instead of trying to fit boxes around non-transparent regions.

Layers

Another powerful option is to draw your sprites on separate layers in your 2D art tool. This can help you preview animation, as you can easily swap between frames. You can then use an export plugin to arrange the separate layer images into a single sprite sheet. You can also bypass the sprite sheet entirely here, and treat the layers as separate images in your game. Unity can create its own sprite sheet automatically at export time, out of your separate image files or PSD layers. It's up to you whether you'd prefer to lay it out yourself or let Unity do it, but it's good to be aware of the option.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Add to existing sprite sheet texture without messing up animations? 1 Answer

On Android, specific sprite animations sometimes don't animate 0 Answers

How to add 2d sprites in 3d unity 2 Answers

Is there a simple way to replace a single sprite in a sprite sheet? 2 Answers

[NGUI] Sprites breaking on switching from Android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges