How can I export 3D models from Unity in binary format?

I have mesh made procedural in Unity and I want to export the mesh so I can have it loaded into my game rather than procedurally generated at run time. However, the FBX Exporter (an official package in Unity) only lets me export fbx models in ASCII format from script - which result in large file sizes.

Is there a way to compress these into a binary format in the import settings, or else export in native binary format from the FBX Exporter from script? (it is possible to use the editor menu UI to export a model in binary using FBX Exporter, but I need to do it via scripting).

Thanks!

I don’t really know what you are up to, but you can try to export it in .UNITYPACKAGE file, or I just have a script you can use to export in .OBJ file, here is the 1: