mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Add C# Example to ImmediateMesh.xml
This commit is contained in:
parent
c21c2706ad
commit
db26963938
@ -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.
|
||||
</description>
|
||||
|
Loading…
Reference in New Issue
Block a user