How to get lods array from mesh?

Godot Version

4.4 stable

Question

I want to retrieve the lods arrays generated using ImporterMesh:

var importer := ImporterMesh.new()
			var surface_count = block_mesh.get_surface_count()
			
			for i in range(surface_count):
				surface_arrays = block_mesh.surface_get_arrays(i)
			if surface_arrays.is_empty():
				continue
			importer.add_surface(Mesh.PRIMITIVE_TRIANGLES, surface_arrays)
			importer.generate_lods(25, 60, Array())
			
			var block_mesh_instance = MeshInstance3D.new()

			block_mesh_instance.mesh = importer.get_mesh()

block_mesh_instance is the mesh i want to access the lods arrays.

There does not seem to be a way to get the LODs information from a mesh that’s not an ImporterMesh

You are already using one so you could try using ImporterMesh.get_surface_lod_count() and ImporterMesh.get_surface_lod_indices() to get them.