Ejemplo n.º 1
0
        public static void SaveGameObjectAsFBX(GameObject go, string fileName)
        {
            if (!isInitialized)
            {
                Initialize();
            }
            FbxExporter.ExportOptions options = FbxExporter.ExportOptions.defaultValue;
            /// Make sure it is in meter.
            options.scale_factor = 100f;
            FbxExporter exporter = new FbxExporter(options);

            exporter.CreateScene(fileName);
            exporter.AddNode(go);
            var ret = exporter.Write(FBX_PATH + fileName + ".fbx", FbxExporter.Format.FbxBinary);

            exporter.Release();
        }