summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-17 11:56:38 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-17 11:56:38 +0100
commit2b9a0aac3eb4a2c5770d04ef41f43aeb4f96aa6c (patch)
treee2dfbcb6b2f83f905b244d04c5e85fa26492b07f
parent184f26a1ba091ea05a14152354a6e9e65130927f (diff)
parentef03e0541986ff826b7b0f299ad26f04bb8af75c (diff)
Merge pull request #68743 from raulsntos/dotnet/array-mesh
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]