From 3e7abc4b132387fa57029601e021ca3197295791 Mon Sep 17 00:00:00 2001 From: SysVR Date: Fri, 12 Jan 2024 09:05:13 +0900 Subject: [PATCH] "Addressed issues of duplicate filenames in file names and the failure to generate UniqueID(#No.) in directories, and fixed the problem of using unavailable names in directory names (using filenames)." --- AssetStudio.GUI/Exporter.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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);