diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-11-16 20:22:55 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-11-16 20:33:46 +0100 |
commit | ef03e0541986ff826b7b0f299ad26f04bb8af75c (patch) | |
tree | b2fdc0063065f95abba4abbc833331b9e570a244 /doc/classes | |
parent | 2846ea1ffafddfc447036b37d255f72cb278b677 (diff) |
C#: Fix incorrect types used in ArrayMesh docs
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/ArrayMesh.xml | 12 |
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<Vector3>(); - 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] |