[CLI] Add more info to the "Info" mode

This commit is contained in:
VaDiM
2025-09-01 23:18:37 +03:00
parent 355c99c034
commit 1d65096001
2 changed files with 10 additions and 4 deletions

View File

@ -647,6 +647,7 @@ namespace AssetStudioCLI.Options
break; break;
case "info": case "info":
o_workMode.Value = WorkMode.Info; o_workMode.Value = WorkMode.Info;
o_exportAssetTypes.Value.Add(ClassIDType.Animator);
break; break;
case "l2d": case "l2d":
case "live2d": case "live2d":

View File

@ -491,9 +491,12 @@ namespace AssetStudioCLI
public static void ShowExportableAssetsInfo() public static void ShowExportableAssetsInfo()
{ {
var exportableAssetsCountDict = new Dictionary<ClassIDType, int>(); var exportableAssetsCountDict = new Dictionary<ClassIDType, int>();
string info = ""; var info = "======";
if (parsedAssetsList.Count > 0) if (parsedAssetsList.Count > 0)
{ {
info += $"\n\n[Unity Version]" +
$"\n# {parsedAssetsList[0].Asset.version}";
foreach (var asset in parsedAssetsList) foreach (var asset in parsedAssetsList)
{ {
if (exportableAssetsCountDict.ContainsKey(asset.Type)) if (exportableAssetsCountDict.ContainsKey(asset.Type))
@ -506,15 +509,17 @@ namespace AssetStudioCLI
} }
} }
info += "\n[Exportable Assets Count]\n"; info += "\n\n[Exportable Assets Count]";
foreach (var assetType in exportableAssetsCountDict.Keys) foreach (var assetType in exportableAssetsCountDict.Keys)
{ {
info += $"# {assetType}: {exportableAssetsCountDict[assetType]}\n"; info += $"\n# {assetType}: {exportableAssetsCountDict[assetType]}";
} }
if (exportableAssetsCountDict.Count > 1) if (exportableAssetsCountDict.Count > 1)
{ {
info += $"#\n# Total: {parsedAssetsList.Count} assets"; info += $"\n#\n# Total: {parsedAssetsList.Count} assets";
} }
info += $"\n\n# Exportable Live2D Models: {l2dModelDict.Count}";
} }
else else
{ {