diff --git a/AssetStudio.GUI/Exporter.cs b/AssetStudio.GUI/Exporter.cs index 02eba557..f5e77b8a 100644 --- a/AssetStudio.GUI/Exporter.cs +++ b/AssetStudio.GUI/Exporter.cs @@ -349,12 +349,13 @@ public static bool ExportAnimator(AssetItem item, string exportPath, List animationList = null) + public static bool ExportGameObject(AssetItem item, string exportPath, List animationList = null) { - var exportFullPath = Path.Combine(exportPath, item.Text, item.Text + ".fbx"); - if (File.Exists(exportFullPath)) + item.Text = FixFileName(item.Text); + var exportFullPath = Path.Combine(exportPath, item.Text) + Path.DirectorySeparatorChar; + if (Directory.Exists(exportFullPath)) { - exportFullPath = Path.Combine(exportPath, item.Text + item.UniqueID, item.Text + ".fbx"); + exportFullPath = Path.Combine(exportPath, item.Text + item.UniqueID) + Path.DirectorySeparatorChar; } var m_GameObject = (GameObject)item.Asset; ExportGameObject(m_GameObject, exportFullPath, animationList);