Skip to content

Commit

Permalink
[GUI] Don't count Shaders in unity 2021+ assets
Browse files Browse the repository at this point in the history
  • Loading branch information
aelurum committed Jul 14, 2023
1 parent 2b6dcca commit 50f5da5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AssetStudioGUI/AssetStudioGUIForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ private async void BuildAssetStructures()
}
allToolStripMenuItem.Checked = true;
var log = $"Finished loading {assetsManager.assetsFileList.Count} files with {assetListView.Items.Count} exportable assets";
var m_ObjectsCount = assetsManager.assetsFileList.Sum(x => x.m_Objects.Count);
var unityVer = assetsManager.assetsFileList[0].version;
var m_ObjectsCount = unityVer[0] > 2020 ?
assetsManager.assetsFileList.Sum(x => x.m_Objects.LongCount(y => y.classID != (int)ClassIDType.Shader)) :
assetsManager.assetsFileList.Sum(x => x.m_Objects.Count);
var objectsCount = assetsManager.assetsFileList.Sum(x => x.Objects.Count);
if (m_ObjectsCount != objectsCount)
{
Expand Down

0 comments on commit 50f5da5

Please sign in to comment.