How to save a generated mesh?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zylann
:warning: Old Version Published before Godot 3 was released.

Is there a way to save a mesh generated from script as a .msh resource?

Hey, were you able to export the generated mesh to an intermediate file format (like .obj or something) ?
Thank you!

omomthings | 2020-03-13 09:35

Godot cannot save as OBJ, only MSH, which is a Godot specific format.
However if you want to save a static mesh it should not be too difficult to code an OBJ saver.

Zylann | 2020-03-13 20:47

:bust_in_silhouette: Reply From: Akien

I never tried it but I think it can be done with ResourceSaver: ResourceSaver — Godot Engine (latest) documentation in English