Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple rectangle in Unity3D

There's plenty of tutorials which explain how to add and manage image objects. But what if I want to add simple rectangle with plain white color? May I do it similar to adding 3D objects? I see no rectangle option under 2D Object in GameObject menu.

I know that I may do it by script, but isn't there any simpler solution? Or maybe I should use 3D Object Cube instead?

like image 513
Lukis Avatar asked Dec 14 '25 08:12

Lukis


1 Answers

For a rectangle (ie a 2D cuboid) you add a 3D object that is a Quad which is a 3D object with a size of 0 in one plane, in effect making it a 2D sheet.

See also: http://docs.unity3d.com/Manual/PrimitiveObjects.html

Quads are most often used as backdrops to 2D games. Once you have the quad you can then change its material properties to set it as a single plain colour.

like image 175
Martin Avatar answered Dec 16 '25 22:12

Martin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!