Skip to content

Commit

Permalink
[CLI] Show the number of successfully loaded assets
Browse files Browse the repository at this point in the history
  • Loading branch information
aelurum committed Jul 14, 2023
1 parent 50f5da5 commit 6701f46
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions AssetStudioCLI/Studio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,26 @@ public void ParseAssets()
containers.Clear();
}
}
var log = $"Finished loading {assetsManager.assetsFileList.Count} files with {parsedAssetsList.Count} exportable assets";
var unityVer = assetsManager.assetsFileList[0].version;
long m_ObjectsCount;
if (unityVer[0] > 2020)
{
m_ObjectsCount = assetsManager.assetsFileList.Sum(x => x.m_Objects.LongCount(y =>
y.classID != (int)ClassIDType.Shader
&& options.o_exportAssetTypes.Value.Any(k => (int)k == y.classID))
);
}
else
{
m_ObjectsCount = assetsManager.assetsFileList.Sum(x => x.m_Objects.LongCount(y => options.o_exportAssetTypes.Value.Any(k => (int)k == y.classID)));
}
var objectsCount = assetsManager.assetsFileList.Sum(x => x.Objects.LongCount(y => options.o_exportAssetTypes.Value.Any(k => k == y.type)));
if (m_ObjectsCount != objectsCount)
{
log += $" and {m_ObjectsCount - objectsCount} assets failed to read";
}
Logger.Info(log);
}

public void ShowExportableAssetsInfo()
Expand Down

0 comments on commit 6701f46

Please sign in to comment.