Sieger’s tutorial on importing images to unity!!

Hi, my name is Sieger Canney and this is my tutorial on how to import images to unity. I will be using paint images I made but this will also be able to work with google images. We are starting this off assuming that you have already started and made a new project in Unity.

  • Step 1: Find your image. For my project I have been making custom photos from paint and Photoshop but you can use images you find online also.

  • Step 2: Save your image to a place that you know you can find. This is rather simple just make sure you save your image to a safe place that you can find.

  • Step 3: Find you project file. For the next steps you will need to know where you saved your unity project. So make sure you know where it is.
  • Step 4: Open your project and find the asset file. Your asset file is basically a gateway between your PC files and the unity program. Its the easiest way to get assets and materials into your game.
  • Step 4.5(optional): Make a new folder in the asset file. Folders are used for organizing your asset file. They are optional but they really do help with keeping track of your game assets.

  • Step 5: Move your image over. This can be done in many ways. You can copy and paste or just drag it over to the file. Do it whatever way you prefer.

  • Step 6: Your done! You did it your images are in your project. To see them just open your game and click on assets in the bottom right. If you made a folder under the asset folder and put your images in there the images will be in that folder. To get them in the actual game just drag and drop the image to the scene above(the one with the grid by default). Enjoy!

 

How To Add a Object in Unity 2D

Starting out in Unity is probably one of the most difficult parts of learning. After you make the base of your game creating objects is much easier, but requires a little work. I’ll show you how to create a little box to stand on, and interact with.

Step 1

First to start just hit the Game Object Button. A drop down menu will appear then hit Create Empty.

Step 2

Once created click on the object and view it in inspector. Then hit the big button called Add Component. You can add different components using the search bar or looking in the different categories. Add Sprite Renderer, and Box Collider 2D.

Step 3

Now you can either add a single picture of the block, or you can use a sheet of lots of sprites and add it to the object that way. The easier way to go if you only need 1 or 2 sprites is the first method, but if you are going to have about more than 4 sprites you should probably use a sprite sheet. I’m going to use a sprite sheet in this tutorial. First after you put your image in Unity select it then hit the Inspector button.

In that menu you’ll find another button that says Sprite Editor. Click on it. You’ll see a bigger version of the picture. Click and drag over the sprite you want to use, and then you can rename
it if you want.

Step 4

By the way if you want you can name your object to ground or something. Anyways once select your sprite from the sprite sheet.

Then drag this to your objects Sprite Renderer. That was a lot of work to add a little sprite.

Step 5

Finally! It is done! Now you can jump all over your white little block. Have fun!

 

How to Make a 2D Sprite in Unity

Hello, world. In this tutorial I will be describing the steps to making a video game sprite of your very own.

  1. Download a portable version of Inkscape to your file on the c drive  from https://inkscape.org/en/download/
  2. Now, this step is extremely important: open Inkscape. 
  3. Next let’s start with the head. Use the circle tool. 
  4. We can edit the head using the Fill and Stroke window. Open this with Shift+Ctrl+F.                                                  
  5. Now let’s make a body. First make a new layer below the head. You can open the Layers window using Shift+Ctrl+L. 
  6. Use the Bezier tool to make a rough shape. It does not have to be perfect, here you can see mine is anything but. 
  7. Using the Edit Path By Nodes tool you can edit the line work. Now it will take the shape you want.                             
  8. If you don’t want the body to have the same style as the head then go ahead and make it however you wish. If you do want it to be the same, first copy the head (Ctrl+C) and then paste the style (Shift+Ctrl+V). 
  9. Using the same tricks you can build up the rest of the sprite, and keep the parts on different layers. You can group shapes together (Ctrl+G) or use the various path options (top ribbon) to form more complex shapes.  
  10. Now that you have your basic sprite, let’s make the sprite sheet. We’re going to make this little guy dance. Copy your sprite a few times. You need to copy the parts separately to keep them on the right layers. 
  11. Edit the parts just a little bit. Move a leg on the second sprite, move it back in the second, etc.                                         
  12. Make sure that the sprites are not touching each other. Highlight the whole sprite and keep the squares from touching or overlapping. 
  13. Export the file as a png (Shift+Ctrl+E). Make sure you are not highlighting anything when you do this. If you open the sprite sheet in images and the background is transparent then you did it right.  
  14. Now open your game in Unity and have the sprite sheet pulled up in the folder. Make sure you have a 2d game. 
  15. Drag the sprite sheet into your empty game object. If you do not have an empty game object, then make one. It’s Ctrl+Shift+N. 
  16. Open the sheet in inspector mode. Make sure it is multiple, not single. 
  17. Open the sprite editor. Slice your sprites. You should now be able to open the sheet and have each sprite individual.  
  18. Set up a animator. Create your Default Layer State. 
  19. Select the sprites and make an animation. Do this by highlighting your sprites, right clicking, hovering over the ‘create’ option, and clicking on the animation option.                           
  20. Once you have your animation, make sure to make it loop. Select your animation, open in inspector mode, and check the loop time box. 
  21. Now that the animation is finished, open your default state in the animator.                                                        
  22. Drag your animation into the motion box. You can edit the speed of the animation just below it.                                
  23. Drag the animator into your game object. 
  24. Make a sprite renderer in your game object. 
  25. Play your game. The sprite should appear and be animated. If it is not, then you did something wrong. It’s okay to cry at this point. There is no shame. Do it. I know you want to.

Animation Tutorial

Below are pictures to my process in creating sprite animations in unity with captions to help you step by step. I made my sprites in adobe illustrator and photoshop. Keep in mind that you need to save copies of the files as illustrator, photoshop, and .png files just in case you need to edit, or reuse the files. Click on the photos for a full view of the screen.

 

 

Finished Roguelike 2D Game

The (should be) finished version of the game is linked below. After playing the game, if you could take the survey to give me some feedback that would be awesome! Thanks 🙂

To play the game ask me, (Im wearing the Iowa State t shirt), and I can have you play the game on the computer next to mine. Unfortunately the file size was too large to directly link. Sorry 🙁

Survey: https://goo.gl/forms/jheK5WK9LzX9QxB12

Gracias!