x


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 http://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.

alt text

more ▼

asked Apr 07 '10 at 08:24 PM

jedster1111 gravatar image

jedster1111
1 1 1 3

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Apr 07 '10 at 08:31 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

Thank you for you help but the image is an irregular shape and I want to use it as the level floor instead of just an image on a rectangle if you see what I mean.

Apr 07 '10 at 08:34 PM jedster1111

@jedset1111: I guess I don't see what you mean, since you can still put an irregularly shaped image on a quad. Maybe you could post some illustrations.

Apr 07 '10 at 08:39 PM Eric5h5

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.

Apr 07 '10 at 09:21 PM jedster1111
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Jun 04 '12 at 07:24 AM

lblaz7 gravatar image

lblaz7
0 2 2 2

(comments are locked)
10|3000 characters needed characters left

Well, one of the best programs you can find, and more so because it's free, is Blender, which you can download here.

more ▼

answered Apr 07 '10 at 08:32 PM

e.bonneville gravatar image

e.bonneville
5.7k 100 116 165

Thanks for the comment, I will give this a try.

Apr 07 '10 at 09:29 PM jedster1111
(comments are locked)
10|3000 characters needed characters left

You may also want to look into the SpriteManager:

http://forum.unity3d.com/viewtopic.php?t=17864

more ▼

answered Apr 07 '10 at 08:46 PM

dhendrix gravatar image

dhendrix
2.2k 25 34 59

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?

Apr 07 '10 at 09:33 PM jedster1111

I've got no idea either... huh.

Apr 08 '10 at 02:19 AM e.bonneville
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1094
x1036
x972
x322

asked: Apr 07 '10 at 08:24 PM

Seen: 5339 times

Last Updated: Jun 04 '12 at 07:24 AM