x


Primitives in Unity

Hi, i'm new to unity and plan on playing around with making a simple 2D game. I understand textured quads are the best way to go for that, and i was wondering: do i need a separate tool to create them? A cursory look in the menus and docs don't show any mention of anything related.

more ▼

asked Mar 28 '10 at 06:59 AM

RCIX gravatar image

RCIX
108 4 4 10

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

2 answers: sort voted first

You do need a separate tool to create quads for 2D games; there's no built-in quad primitive. The built-in plane is 200 triangles, which is massive overkill and not really appropriate. You can either make a quad in a 3D app and import it into Unity, create one in code, or use this editor script.

more ▼

answered Mar 28 '10 at 07:35 AM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

Hmm, thanks. Do you know why Unity does this by default?

Mar 28 '10 at 10:48 AM RCIX

You mean the plane being 200 triangles? That's in case you're using vertex lighting (as opposed to pixel lighting) and want get at least some kind of visible results with point or spot lights.

Mar 28 '10 at 05:06 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left

Unity can create various primitive shapes for you, and you can texture them however you want using Meshes (although you cannot, to my knowledge, UV Map a primitive in Unity).

Primitives can be found by going to Game Object > Create Other... A menu will pop up, and the primitives are at the bottom of the list. This process creates a GameObject and populates it with a Mesh, MeshCollider (or the appropriate type of primitive collider), and MeshRenderer component.

more ▼

answered Mar 28 '10 at 07:06 AM

qJake gravatar image

qJake
11.6k 43 78 161

Ok, thanks so much!

Mar 28 '10 at 07:07 AM RCIX

You actually can, SpikeX. The problem is that this change will be saved 'behind the scenes'. So the next time in your project you for instance create a cube, all changes will still apply. Everything will be reset once you save and restart the project. The changed primitive in your scene will remain changed, however.

May 23 '11 at 10:08 PM Joshua
(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:

x3740
x1038
x28

asked: Mar 28 '10 at 06:59 AM

Seen: 7735 times

Last Updated: May 23 '11 at 10:08 PM