mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
Fix missing uniqueId for some asset types
This commit is contained in:
@@ -4,6 +4,8 @@ namespace AssetStudioCLI
|
||||
{
|
||||
internal class AssetItem
|
||||
{
|
||||
private static long _counter;
|
||||
|
||||
public Object Asset;
|
||||
public SerializedFile SourceFile;
|
||||
public string Container = string.Empty;
|
||||
@@ -12,7 +14,7 @@ namespace AssetStudioCLI
|
||||
public long FullSize;
|
||||
public ClassIDType Type;
|
||||
public string Text;
|
||||
public string UniqueID;
|
||||
public readonly string UniqueID;
|
||||
public ulong Hash;
|
||||
public GameObjectNode Node;
|
||||
|
||||
@@ -24,6 +26,7 @@ namespace AssetStudioCLI
|
||||
TypeString = Type.ToString();
|
||||
m_PathID = asset.m_PathID;
|
||||
FullSize = asset.byteSize;
|
||||
UniqueID = $" #{_counter++}";
|
||||
Hash = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,6 @@ namespace AssetStudioCLI
|
||||
{
|
||||
var assetItem = new AssetItem(asset);
|
||||
objectAssetItemDic.Add(asset, assetItem);
|
||||
assetItem.UniqueID = "_#" + i;
|
||||
var isExportable = false;
|
||||
switch (asset)
|
||||
{
|
||||
|
||||
@@ -1587,6 +1587,7 @@ namespace AssetStudioGUI
|
||||
Logger.Info("Resetting program...");
|
||||
|
||||
Text = guiTitle;
|
||||
AssetItem.Reset();
|
||||
Studio.assetsManager.Clear();
|
||||
Studio.assemblyLoader.Clear();
|
||||
Studio.exportableAssets.Clear();
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace AssetStudioGUI
|
||||
{
|
||||
internal class AssetItem : ListViewItem
|
||||
{
|
||||
private static long _counter;
|
||||
|
||||
public Object Asset;
|
||||
public SerializedFile SourceFile;
|
||||
public string Container = string.Empty;
|
||||
@@ -13,7 +15,7 @@ namespace AssetStudioGUI
|
||||
public long FullSize;
|
||||
public ClassIDType Type;
|
||||
public string InfoText;
|
||||
public string UniqueID;
|
||||
public readonly string UniqueID;
|
||||
public ulong Hash;
|
||||
public GameObjectTreeNode TreeNode;
|
||||
|
||||
@@ -25,6 +27,7 @@ namespace AssetStudioGUI
|
||||
TypeString = Type.ToString();
|
||||
m_PathID = asset.m_PathID;
|
||||
FullSize = asset.byteSize;
|
||||
UniqueID = $" #{_counter++}";
|
||||
Hash = 0;
|
||||
}
|
||||
|
||||
@@ -38,5 +41,10 @@ namespace AssetStudioGUI
|
||||
FullSize.ToString(), //Size
|
||||
});
|
||||
}
|
||||
|
||||
public static void Reset()
|
||||
{
|
||||
_counter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,6 @@ namespace AssetStudioGUI
|
||||
{
|
||||
var assetItem = new AssetItem(asset);
|
||||
objectAssetItemDic.Add(asset, assetItem);
|
||||
assetItem.UniqueID = " #" + i;
|
||||
var exportable = false;
|
||||
switch (asset)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user