Why does Mesh in Godot 3.0 have so few functions compared to 2.1?

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

I compared these pages:

Can anybody explain why so many functions are not there anymore? I want to use the surface_get_material() function, but it doesn’t exist in 3.0.

:bust_in_silhouette: Reply From: eons

That method is part of MeshInstance now.

But my mesh is not part of a meshinstance. It’s a render pass of a particles node. Particles — Godot Engine (3.0) documentation in English

metin | 2018-06-23 10:10

:bust_in_silhouette: Reply From: BE-Never Games

The methods are still there, they have just been moved to a different class. As you can see on the ‘3.0’ version of the mesh type, there are now two classes inheriting from it, ‘ArrayMesh’ and ‘PrimitiveMesh’. ‘Mesh’ is now an abstract class. The methods you are looking for are now part of the ‘ArrayMesh’ type.
It makes more sense logically, this way it is now possible to have multiple different mesh types such as ArrayMesh for imported models etc, PrimitiveMesh for builtin primitive types and possible other future ones with some shared functionality.

TL;DR: The methods are still there, they are now located in the ‘ArrayMesh’ class.

I hope that I could help you :slight_smile: