- Home /
How do I export GameObject (including child sub-object) to .obj file?
To export a gameobject to .obj file, I'm using Obj exporter. I can do that in editor, but I'd like to do in game. I put GameObject(this includes two Cubes) in a scene, though no components in the GameObject. Once I try export it using MeshToFile, NullReferenceException comes up. I know the GameObject doesn't have meshfilter, but what I'd like to do is export whole GameObject including child sub-object. I could do in editor by selecting the GameObject and exporting.
Why can't do the same thing in game?
Could anyone help me?
Answer by mvallance · May 19, 2014 at 12:15 PM
Have you checked this? It 'may' answer your question. http://wiki.unity3d.com/index.php?title=ExportOBJ
Also, do you think this will help you? It is a popular plugin for developers. http://whydoidoit.com/unityserializer/