C#: Fix incorrect types used in ArrayMesh docs
This commit is contained in:
parent
2846ea1ffa
commit
ef03e05419
1 changed files with 7 additions and 5 deletions
|
@ -25,10 +25,12 @@
|
||||||
m.mesh = arr_mesh
|
m.mesh = arr_mesh
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var vertices = new Godot.Collections.Array<Vector3>();
|
var vertices = new Vector3[]
|
||||||
vertices.Add(new Vector3(0, 1, 0));
|
{
|
||||||
vertices.Add(new Vector3(1, 0, 0));
|
new Vector3(0, 1, 0),
|
||||||
vertices.Add(new Vector3(0, 0, 1));
|
new Vector3(1, 0, 0),
|
||||||
|
new Vector3(0, 0, 1),
|
||||||
|
};
|
||||||
|
|
||||||
// Initialize the ArrayMesh.
|
// Initialize the ArrayMesh.
|
||||||
var arrMesh = new ArrayMesh();
|
var arrMesh = new ArrayMesh();
|
||||||
|
@ -38,7 +40,7 @@
|
||||||
|
|
||||||
// Create the Mesh.
|
// Create the Mesh.
|
||||||
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
|
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
|
||||||
var m = new MeshInstance();
|
var m = new MeshInstance3D();
|
||||||
m.Mesh = arrMesh;
|
m.Mesh = arrMesh;
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
|
|
Loading…
Reference in a new issue