Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Importing sprites for 2D is just like importing any other asset. You can either copy that file into your Assets or Textures folder, or wherever it is you're placing them, or you can right-click in the Assets section and choose Import New Asset. I've already put some 2D assets in the Textures folder here in my Assets. There's CarsBackground and Cars2D. The car's 2D has an alpha channel. And, when we look at it, we can see that the cars are in white, mostly. And, the background is in black.
There's also a ground plain down there. So, that the bottom cars can ride along it and fall onto it. CarsBackground then, is just a background image. What I'll do first, when I import these in to make them 2D. Is change the text or type. I'll drop down under texter and choose sprite. I'll also change the size. In this case, this background image was drawn at 2048, and I'd like it to be big, so I'll let the max size be bigger. I'll leave alone the packing tag, pixels, and pivot for the moment.
This is going to be a static sprite, just there as a background, and so I'll just make sure I push it to the back in the new sorting layers. I'll click apply, and I'm ready to bring in the cars. I'll select the cars and what we can see here is that alpha channel. Again, this was drawn large, and that way I can bring it in with good-looking sprites instead of compressing them. I'll make the max size 2048, and turn the format from compressed to true color. This is an important note. If you leave it as the default, compressed.
When you go into the sprite editor, you'll get messages saying, wait a minute, this is not going to look good because you're working with compressed images. And you'll see some pixelation and odd edges in your sprites. So when you're working with sprites, because inherently you're dealing in smaller assets, you can work in True Color. I'll also change this texture type to sprite. And in this case, this is going to be multiple sprites. We have a choice in here between single and multiple. Single as the name implies means that this is all one sprite of all these cars.
Multiple then, means I'm going to break this up in the sprite editor, into multiple sprites, and place them around or link them together. I'll choose multiple, and then click apply. I can go straight from here into the sprite editor. Or I can open the sprite editor separately. Now it's regarded as a sprite. And the alpha channel is automatically knocked out. I'm ready to break this up into the individual cars, and put on the new 2D colliders and 2D physics.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33213 Viewers
94 Video lessons · 23047 Viewers
78 Video lessons · 9442 Viewers
147 Video lessons · 3167 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.