mesh | The Mesh to draw. |
position | Position of the mesh. |
rotation | Rotation of the mesh. |
matrix | Transformation matrix of the mesh (combines position, rotation and other transformations). |
material | Material to use. |
layer | Layer to use. |
camera | If null (default), the mesh will be drawn in all cameras. Otherwise it will be rendered in the given camera only. |
submeshIndex | Which subset of the mesh to draw. This applies only to meshes that are composed of several materials. |
properties | Additional material properties to apply onto material just before this mesh will be drawn. See MaterialPropertyBlock. |
Draw a mesh.
// Draws aMesh with aMaterial at (0,0,0) with no rotation for one frame var aMesh : Mesh; var aMaterial : Material; function Update() { Graphics.DrawMesh(aMesh, Vector3.zero, Quaternion.identity, aMaterial, 0); }