# How can I export a .FBX file from Unity3D at runtime?

I want to export an object as a .fbx at runtime in Unity3D.

I've made a C# script to export a mesh filter or skinned mesh renderer to a .obj file at runtime, but I want the animation and skin support that only .fbx supports.

After some research, using the Autodesk FBX SDK or some other external .dll seems like my best option. How do I call Autodesk's FBX SDK at runtime? Is there another external .dlls I could use for this?

Another option could possibly be to write the mesh information as a text file, then convert to .fbx to export.

• Does it have to be FBX? That's a proprietary, mostly undocumented format that most people can only access via the FBX SDK. Compare to, say, Collada, which is open and well-documented and should work in whatever tool you're loading the generated FBX into. Jun 27 '13 at 5:46
• More to the point, why are you exporting at runtime? There might be another solution for what you actually want to do other than the solution you think you need to do. Jun 27 '13 at 7:42
• Does Collada support skinned mesh renderers and animations? If so something like that may work, I was just told FBX because of the information it can hold and because it works for any 3D platform. And I'm exporting at runtime because that's the entire purpose of this script, essentially the user can adjust the mesh and textures on their character, then press an "Export" button and download the textures and .fbx for the character. This is all done in the web player, I have it working with textures, animations, and .OBJ. But I'd like .FBX because it supports skinned mesh renderers and animations Jun 27 '13 at 17:02
• However, if I could export to another supported 3D format that would be able to hold skin information and special animation information that would work even better than .FBX. Jun 27 '13 at 17:03
• @TimothyWilliams Collada supports skinning and animations. Feb 19 '14 at 11:46