One more thing, when making a build you get an error because AssetDatabase is in the UnityEditor namespace.
Enclosing the contents of SaveMeshToFolder in #if UNITY_EDITOR fixes it.
Thanks for the tool, very handy!
I ran across a couple of errors when trying to save the generated mesh:
It can't save the mesh file until you create SavedMeshData folder (not in the package).
There is a HideFlags assertion and the saved mesh doesn't show as a Mesh. Fixed by adding m.hideFlags = HideFlags.None; to SaveMeshToFolder().
This was in Unity 2022.4.37f1.
Cheers,
Alex