Format
typescript
Graphics.DrawMesh(world, mesh, mtl, shadow_cast)class: Graphics
Description
Draw a mesh.
DrawMesh draws a mesh for one frame. The mesh will be affected by lighting, can cast and receive shadows, and be affected by projectors - just like it is part of some game object. It can be drawn for all cameras or only for specific cameras.
If you want to draw a large number of meshes but don't want to incur the overhead of creating and managing game objects, use DrawMesh. Note that DrawMesh does not immediately draw the mesh; it just "submits" it for rendering. The mesh will be rendered as part of the normal rendering process. If you want to draw the mesh immediately, use Graphics.DrawMeshNow.
Parameters
| param_name | type | description |
|---|---|---|
| world | Matrix4x4 | The world coordinate matrix. |
| mesh | Mesh | The mesh to be drawn. |
| mtl | Material | The texture to use when drawing the mesh. |
| shadow_cast | ShadowCastingMode? | Determines if the mesh can cast shadows. |
Return
| type | description |
|---|---|
void |
