#SurfaceTool.CreateFrom not working?

1 messages · Page 1 of 1 (latest)

near osprey
#

So, I am following a tutorial for creating terrain displacement in Godot 3D but in C#.
My code is attached and every time I run it, it gives me the same error on line 32 surfaceTool.CreateFrom(arrayMesh, 0);
But it gives me no other information on why this occurs?

#
  <Stack Trace>  Godot.NativeInterop.NativeFuncs.generated.cs:345 @ void Godot.NativeInterop.NativeFuncs.godotsharp_method_bind_ptrcall(IntPtr , IntPtr , System.Void** , System.Void* )
                 NativeCalls.cs:5019 @ void Godot.NativeCalls.godot_icall_2_564(IntPtr , IntPtr , IntPtr , Int32 )
                 SurfaceTool.cs:422 @ void Godot.SurfaceTool.CreateFrom(Godot.Mesh , Int32 )
                 MeshGenerator.cs:32 @ void MeshGenerator.GenerateTerrainMesh(Int32 , NoiseData , Single , Godot.Curve , Int32 )
                 WorldGeneration.cs:134 @ void WorldGeneration+Chunk.UpdateMesh()
                 WorldGeneration.cs:114 @ WorldGeneration+Chunk..ctor(WorldGeneration , Godot.Vector2 , Int32 )
                 WorldGeneration.cs:72 @ void WorldGeneration.UpdateVisibleChunks()
                 WorldGeneration.cs:50 @ void WorldGeneration._Process(Double )
                 Node.cs:2087 @ Boolean Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name& , Godot.NativeInterop.NativeVariantPtrArgs , Godot.NativeInterop.godot_variant& )
                 Node3D.cs:999 @ Boolean Godot.Node3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name& , Godot.NativeInterop.NativeVariantPtrArgs , Godot.NativeInterop.godot_variant& )
                 WorldGeneration_ScriptMethods.generated.cs:38 @ Boolean WorldGeneration.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name& , Godot.NativeInterop.NativeVariantPtrArgs , Godot.NativeInterop.godot_variant& )
                 CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(IntPtr , Godot.NativeInterop.godot_string_name* , Godot.NativeInterop.godot_variant** , Int32 , Godot.NativeInterop.godot_variant_call_error* , Godot.NativeInterop.godot_variant* )
#

That is the entire error

near osprey
#

I fixed it,