Godot 4 Mesh.new() error

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

I have a generic MeshInstance3D node (let’s call it MyNode). When I try:

$MyNode.mesh = Mesh.new()

I get a console error

Required virtual method Mesh::_get_surface_count must be overridden before calling.
Required virtual method Mesh::_get_blend_shape_count must be overridden before calling.

What am I doing wrong?
The issue happens both with and without a loaded mesh resource.

I’ve not used v4, but maybe you have to create a type of mesh, e.g. CylinderMesh.new().

SteveSmith | 2022-10-04 06:26

:bust_in_silhouette: Reply From: stum

_gdvirtual_get_surface_count_call: Required virtual method Mesh::_get_surface_count must be overwritten before calling

gdvirtual seems to be an autodesk file, I’m importing a glb from blender and having a similar problems

:bust_in_silhouette: Reply From: Game_gulf

same error :((