diff --git a/AssetStudioGUI/Studio.cs b/AssetStudioGUI/Studio.cs index c6455093..292b1a7a 100644 --- a/AssetStudioGUI/Studio.cs +++ b/AssetStudioGUI/Studio.cs @@ -250,6 +250,11 @@ public static (string, List) BuildAssetData() } foreach (var tmp in exportableAssets) { + if (tmp.Container == "" && tmp.Asset is Component m_Component) + { + if (m_Component.m_GameObject.TryGet(out var obj)) + tmp.Container = objectAssetItemDic[obj].Container; + } tmp.SetSubItems(); } containers.Clear(); @@ -392,7 +397,7 @@ public static void ExportAssets(string savePath, List toExportAssets, case 1: //container path if (!string.IsNullOrEmpty(asset.Container)) { - exportPath = Path.Combine(savePath, Path.GetDirectoryName(asset.Container)); + exportPath = Path.Combine(savePath, asset.Container); } else {