Merge pull request #68743 from raulsntos/dotnet/array-mesh

C#: Fix incorrect types used in ArrayMesh docs
This commit is contained in:
Rémi Verschelde 2022-11-17 11:56:38 +01:00
commit 2b9a0aac3e
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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]