- Home /
Importing 2D objects into Unity
Hi everybody, first post here. I started using Unity recently and purchased "Unity Game Development Essentials" which got me from no knowledge in coding to a decent amount in two days. After completing the book, I wanted to start my own simple project, a simple 2D game, the kind where you have to balance a motorbike or some other vehicle up jumps (you know the kind). I immediatly opened up paint.net, hoping that I'd be able to import images into the game world and then give them colliders. I could get them in my assets but not actually into the scene itself. Is it possible to do this? And also, If I can't and I need to make them in an alternate program, which one would be best? (Would wings 3d work?)
Thanks in advance and I'm looking forward to posting here in the future, hopefully I might even be able to help someone else one day.
[edit] Basically, I want the character to be able to roll up and down these hills. I was hoping I could just add the picture to unity and then add colliders to it and then ake a skateboard which would then be able to roll along with it. What's the easiest way to do this because I don't think that you can do this with .png.
Answer by wbarrier · Mar 10, 2015 at 03:44 PM
First add the picture. when you add it make sure its set as a Sprite under texture type. Then add a sprite to your scene. Once add go over to the inspector and click the tiny circle beside the blank box beside Sprite. Find your picture and done. You added a picture without the background on it. (Note: Picture must be on that can be viewed without white background)
Yes, that is exactly how do you it. Worked fine for me. Thanks.
Answer by Eric5h5 · Apr 07, 2010 at 08:31 PM
You need something to put your images on; Unity is a 3D engine and everything, even 2D, is done in 3D. Make a simple quad in a 3D app and import that into Unity, then drag it into the scene. Then attach a material that has an image to the quad.
Thank you for you help but the image is an irregular shape and I want to use it as the level floor ins$$anonymous$$d of just an image on a rectangle if you see what I mean.
@jedset1111: I guess I don't see what you mean, since you can still put an irregularly shaped image on a quad. $$anonymous$$aybe you could post some illustrations.
I want the quod to match the shape of the picture. Sorry if I'm not making much sense, I'll edit my post above to include picture.
Answer by e-bonneville · Apr 07, 2010 at 08:32 PM
Well, one of the best programs you can find, and more so because it's free, is Blender, which you can download here.
Answer by dhendrix · Apr 07, 2010 at 08:46 PM
You may also want to look into the SpriteManager:
Thanks fo the comment but I have to admit, I don't quite understand what he's talking about lol. Would I need this though in order to make a 2D game?
Answer by lblaz7 · Jun 04, 2012 at 07:24 AM
add the image as a .png then make a material with it. Then attach it to a sphere or if you don't want the image to be distorted add it to a cube and attach a sphere collider.
Your answer
Follow this Question
Related Questions
kite game should be 2D or3d?? 0 Answers
2 colliders on 1 opbject is that possible?? 1 Answer
Duplication Problem. Please help. 2 Answers
Object Colliders 2 Answers
Disable automatic material creation when importing models 0 Answers