How do you get_mesh() in C# mono

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By penubag

I can change the size of the mesh by doing this in GDScript:

$"../World/Ocean".get_mesh().size = Vector2(init_w.value, init_h.value)

How do you do this in C#?
There is no GetMesh() function or anything similar

 GetNode("World/Ocean").GetMesh() //Doesn't exist

But I see it in the docs, is this function not working?

Bonus: is there a place where I can find what a C#'s GDScript equivalent is?

:bust_in_silhouette: Reply From: jgodfrey

The page you linked is for version 3.0.3. If you look at the more up-to-date docs (3.2), you’ll see that the GetMesh() method has been deprecated in favor of a Mesh property.

Thanks for your answer but I’m having trouble still.


Says ‘Node’ does not contain a definition for ‘Mesh’ even though I am casting it. How do you do this?

penubag | 2021-02-06 21:56