summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-11-16 20:22:55 +0100
committerRaul Santos <raulsntos@gmail.com>2022-11-16 20:33:46 +0100
commitef03e0541986ff826b7b0f299ad26f04bb8af75c (patch)
treeb2fdc0063065f95abba4abbc833331b9e570a244
parent2846ea1ffafddfc447036b37d255f72cb278b677 (diff)
C#: Fix incorrect types used in ArrayMesh docs
-rw-r--r--doc/classes/ArrayMesh.xml12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index ab948dd0de..b9c8ab0f6c 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -25,10 +25,12 @@
m.mesh = arr_mesh
[/gdscript]
[csharp]
- var vertices = new Godot.Collections.Array&lt;Vector3&gt;();
- vertices.Add(new Vector3(0, 1, 0));
- vertices.Add(new Vector3(1, 0, 0));
- vertices.Add(new Vector3(0, 0, 1));
+ var vertices = new Vector3[]
+ {
+ new Vector3(0, 1, 0),
+ new Vector3(1, 0, 0),
+ new Vector3(0, 0, 1),
+ };
// Initialize the ArrayMesh.
var arrMesh = new ArrayMesh();
@@ -38,7 +40,7 @@
// Create the Mesh.
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
- var m = new MeshInstance();
+ var m = new MeshInstance3D();
m.Mesh = arrMesh;
[/csharp]
[/codeblocks]