Show/Export object dump if typetree dump is not available

This commit is contained in:
VaDiM
2024-02-11 19:00:03 +03:00
parent f90c0ecc00
commit 8460ecef8d
7 changed files with 64 additions and 4 deletions

View File

@ -486,7 +486,8 @@ namespace AssetStudioGUI
break;
}
exportPath += Path.DirectorySeparatorChar;
Logger.Info($"[{exportedCount + 1}/{toExportCount}] Exporting {asset.TypeString}: {asset.Text}");
var mode = exportType == ExportType.Dump ? "Dumping" : "Exporting";
Logger.Info($"[{exportedCount + 1}/{toExportCount}] {mode} {asset.TypeString}: {asset.Text}");
try
{
switch (exportType)
@ -785,6 +786,10 @@ namespace AssetStudioGUI
var type = MonoBehaviourToTypeTree(m_MonoBehaviour);
str = m_MonoBehaviour.Dump(type);
}
if (string.IsNullOrEmpty(str))
{
str = obj.DumpObject();
}
return str;
}