bool DoExport(string path, FbxExporter.Format format, GameObject[] objects) { var exporter = new FbxExporter(m_opt); exporter.CreateScene(System.IO.Path.GetFileName(path)); foreach (var obj in objects) { exporter.AddNode(obj); } if (exporter.WriteAsync(path, format)) { Debug.Log("Export started: " + path); s_records.Add(new Record { path = path, exporter = exporter }); if (s_records.Count == 1) { EditorApplication.update += PollAsyncWrite; } return(true); } else { Debug.Log("Export failed: " + path); return(false); } }
bool DoExport(string path, FbxExporter.Format format, GameObject[] objects) { var exporter = new FbxExporter(m_opt); exporter.CreateScene(System.IO.Path.GetFileName(path)); foreach (var obj in objects) { exporter.AddNode(obj); } var ret = exporter.Write(path, format); exporter.Release(); return(ret); }