2

I generate model buildings dynamically in Unity3d. After they are generated I have lots of Meshes in the Scene. How do I save it as a .fbx file?

Tom
  • 2,372
  • 4
  • 25
  • 45
Knaus Irina
  • 789
  • 5
  • 15
  • 35
  • sry i cant provide a good answer, but try to give this link a look. http://docs.unity3d.com/Manual/HOWTO-exportFBX.html Hope it helps, good luck. – Jorge Santos Nov 06 '15 at 10:21
  • That guide is for exporting FBX INTO Unity3D. @Jorge not helpful. Here is an incomplete but insightful piece of code that is from the 2009 Google code thingy https://gist.github.com/mstevenson/6159107 via Matt Stevenson. – twobob Apr 15 '17 at 03:32

1 Answers1

1

There is this plugin that may help you: https://www.assetstore.unity3d.com/en/#!/content/37276

If you just need to save your models for further use, however, the simplest way to do it is to save them with Unity own format using AssetDatabase.CreateAsset from UnityEditor package, like this:

using UnityEngine;
using UnityEditor;

[RequireComponent(typeof(MeshFilter))]
public class Example : MonoBehaviour
{
    private void Start()
    {
        AssetDatabase.CreateAsset(GetComponent<MeshFilter>().mesh, "Assets/mesh.asset");
    }
}

Or you can use this free plugin to export OBJ: https://www.assetstore.unity3d.com/en/#!/content/15862

Yuri Nudelman
  • 2,874
  • 2
  • 17
  • 24
  • I don`t want use AssetDatabase, because I have many count of meshes and meterials - it takes long time save each assets separate (somethimes 1 day). I don`t may use format .obj, because its could not save transform of meshes. I have many gameObjects, that contains the same mesh, but with some transform (move, scale or rotate). If I use obj then its generate for each new transfrom gameobject new mesh - Its very bad, because I generate assetbundles for its (very big size of assetbundles became). – Knaus Irina Nov 05 '15 at 13:25