How do you make mesh in Unity?

I know how to insert a mesh block or cyliner or whatever the different shapes are. I also know how to resize it. My question is though, how to youcan edit mesh and make it a custom shape?

P.S. Sorry if this seems like a dumb question to any of you. I just started using Unity a few days ago, and I'm still trying to familiarize myself with it.

You can create Meshes procedurally, which is useful if your custom shapes can be generated from code.


You can even add custom menu handlers to the editor so that your shapes can be added just like the standard ones.

For "artistic" shapes, +1 to the Blender suggestion, I wouldn't try and program anything more complicated than a teapot if I were you! :-)

Everything is about vertexes, triangles, edges, normals, UVs etc… Example:

using UnityEngine;
using System.Collections;

public class Plane_Mesh_Script : MonoBehaviour {

	public Vector3[] Vertex = new Vector3[] 
		new Vector3(0,0,0),new Vector3(1,0,0),new Vector3(0,1,0),new Vector3(1,1,0)

	public Vector2[] UV_MaterialDisplay = new Vector2[] 
		new Vector2(0,0),new Vector2(1,0),new Vector2(0,1),new Vector2(1,1) // 4 UV with all directions! (Plane has 4 uvMaps)

	public int[] Triangles = new int[6]; // 2 Triangle combinations (2*3=6 vertices/vertexes)

	public Material material;
	void Start () {

		Triangles [0] = 0;
		Triangles [1] = 3;
		Triangles [2] = 1;

		Triangles [3] = 0;
		Triangles [4] = 2;
		Triangles [5] = 3;

		Mesh mesh = new Mesh ();
		transform.GetComponent<MeshFilter> ();

		if(!transform.GetComponent<MeshFilter> () ||  !transform.GetComponent<MeshRenderer> () ) //If you havent got any meshrenderer or filter

		transform.GetComponent<MeshFilter> ().mesh = mesh; = "MyOwnObject";

		mesh.vertices = Vertex;
		mesh.triangles = Triangles;
		mesh.uv = UV_MaterialDisplay;

		mesh.RecalculateNormals ();
		mesh.Optimize ();
		transform.gameObject.renderer.material = material; //If you want a material.. you have it :)


Unity is a game engine not a modeling program. So you cannot edit meshes in Unity.

If you are looking for a free modeler, Blender is always useful. Download 2.49 because 2.55 is still a beta, and didn't work well with Unity last time I checked.