diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml index bde11a850e5..7e40d0b4c53 100644 --- a/doc/classes/ImmediateMesh.xml +++ b/doc/classes/ImmediateMesh.xml @@ -15,6 +15,14 @@ mesh.surface_add_vertex(Vector3.ZERO) mesh.surface_end() [/gdscript] + [csharp] + var mesh = new ImmediateMesh(); + mesh.SurfaceBegin(Mesh.PrimitiveType.Triangles); + mesh.SurfaceAddVertex(Vector3.Left); + mesh.SurfaceAddVertex(Vector3.Forward); + mesh.SurfaceAddVertex(Vector3.Zero); + mesh.SurfaceEnd(); + [/csharp] [/codeblocks] [b]Note:[/b] Generating complex geometries with [ImmediateMesh] is highly inefficient. Instead, it is designed to generate simple geometry that changes often.