Can you make Mesh manipulations persistent?

I’m trying to develop a game together with 2 friends, only one of us is competent with drawing 3D Objects so he does all the modeling and hands us the .fbx files. Most of these files are a collection of objects which show up as a prefab in our scene. For example a ship where the rudder and cannons are all parts of the parent ‘ship’ object. However in some of the subobjects, the pivotpoint is wrongly defined and supposedly this is a lot of effort to fix in the modellingtool. I decided to write an editor extension to fix the pivotpoints in the meshes by editing the sharedMesh property.

However after closing Unity, the pivotpoints of the meshes are somehow reset. As far as I read in the documentation, modifying the sharedMesh property changes the actual model and should make it persistent throughout the project.

Is there something I’m missing to make the changes on the meshes persistent?

I managed to find a solution, it’s not very elegant, but it works in for my usecase.

Instantiate the mesh:

Mesh meshToSave = Instantiate(rotatable.GetComponent<MeshFilter>().sharedMesh) as Mesh;

apply the required operations to the vertices of this mesh, then create an asset from this mesh and save it.

Check the following link: Unity - Manual: Modifying Source Assets Through Scripting

Under ‘Direct Modification’, there is a script that you can use to permanently save changes to source asset files.