mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Fixes for Unity version parser
This commit is contained in:
@ -266,7 +266,7 @@ namespace AssetStudioGUI
|
||||
var typeMap = await Task.Run(() => BuildClassStructure());
|
||||
productName = string.IsNullOrEmpty(productName) ? "no productName" : productName;
|
||||
|
||||
Text = $"{guiTitle} - {productName} - {assetsManager.assetsFileList[0].unityVersion} - {assetsManager.assetsFileList[0].m_TargetPlatform}";
|
||||
Text = $"{guiTitle} - {productName} - {assetsManager.assetsFileList[0].version} - {assetsManager.assetsFileList[0].m_TargetPlatform}";
|
||||
|
||||
assetListView.VirtualListSize = visibleAssets.Count;
|
||||
|
||||
@ -278,7 +278,7 @@ namespace AssetStudioGUI
|
||||
classesListView.BeginUpdate();
|
||||
foreach (var version in typeMap)
|
||||
{
|
||||
var versionGroup = new ListViewGroup(version.Key);
|
||||
var versionGroup = new ListViewGroup(version.Key.FullVersion);
|
||||
classesListView.Groups.Add(versionGroup);
|
||||
|
||||
foreach (var uclass in version.Value)
|
||||
|
@ -429,12 +429,12 @@ namespace AssetStudioGUI
|
||||
return (productName, treeNodeCollection);
|
||||
}
|
||||
|
||||
public static Dictionary<string, SortedDictionary<int, TypeTreeItem>> BuildClassStructure()
|
||||
public static Dictionary<UnityVersion, SortedDictionary<int, TypeTreeItem>> BuildClassStructure()
|
||||
{
|
||||
var typeMap = new Dictionary<string, SortedDictionary<int, TypeTreeItem>>();
|
||||
var typeMap = new Dictionary<UnityVersion, SortedDictionary<int, TypeTreeItem>>();
|
||||
foreach (var assetsFile in assetsManager.assetsFileList)
|
||||
{
|
||||
if (typeMap.TryGetValue(assetsFile.unityVersion, out var curVer))
|
||||
if (typeMap.TryGetValue(assetsFile.version, out var curVer))
|
||||
{
|
||||
foreach (var type in assetsFile.m_Types.Where(x => x.m_Type != null))
|
||||
{
|
||||
@ -458,7 +458,7 @@ namespace AssetStudioGUI
|
||||
}
|
||||
items[key] = new TypeTreeItem(key, type.m_Type);
|
||||
}
|
||||
typeMap.Add(assetsFile.unityVersion, items);
|
||||
typeMap.Add(assetsFile.version, items);
|
||||
}
|
||||
}
|
||||
return typeMap;
|
||||
|
Reference in New Issue
Block a user