FBX Exporter: Failed to build project due to UnityEditor.Formats

Hello there,

I’m currently working on a project where the player can design an object and then export it as an FBX for use in an other projects and programs. I have tested this and have so far been able to export my generated meshes with both the editor UI as well as a script call in play mode.

However, this fails when I try to build my project to run outside the editor, because UnityEditor.Formats does not exist in that context.

According to the dev guide, it should be possible to make such an exporter work. However the description on how to do this seems to be pretty vague.
https://docs.unity3d.com/Packages/com.unity.formats.fbx@2.0/manual/devguide.html

Is there a more detailed description on how to do this? It only working on 64 bit Windows and MacOS is fine for me for now. I have also already reimported the package since I needed to change the script export type to Binary, as mentioned [[Here]]( New FBX Exporter in 2017.2 page-13#post-6322497)

Hello,

The FBX exporter is currently editor only, therefore it is not possible to include it in a build.

However, it is possible to use the FBX SDK C# bindings (com.autodesk.fbx) package at runtime.
This would require writing a custom exporter that uses these bindings and no editor functionality.

If you choose to do so, I recommend taking a look at the FBX exporter source, as well as the FBX SDK C++ documentation:
https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_cpp_ref_annotated_html
http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/