示例#1
0
    private bool DoExport(string path, GameObject[] objects, FbxExporter.Format format)
    {
        _save_mode = FbxExporter.ExportOptions.defaultValue;
        _exporter  = new FbxExporter(_save_mode);
        _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);
            return(true);
        }
        else
        {
            Debug.Log("Export failed: " + path);
            return(false);
        }
    }