@@ -85,7 +85,7 @@ namespace AssetStudio.GUI
|
|||||||
{
|
{
|
||||||
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
|
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Text = $"YarikStudio v{Application.ProductVersion}";
|
Text = $"Studio v{Application.ProductVersion}";
|
||||||
InitializeExportOptions();
|
InitializeExportOptions();
|
||||||
InitializeProgressBar();
|
InitializeProgressBar();
|
||||||
InitializeLogger();
|
InitializeLogger();
|
||||||
@@ -308,7 +308,7 @@ namespace AssetStudio.GUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text = $"YarikStudio v{Application.ProductVersion} - {productName} - {assetsManager.assetsFileList[0].unityVersion} - {assetsManager.assetsFileList[0].m_TargetPlatform}";
|
Text = $"Studio v{Application.ProductVersion} - {productName} - {assetsManager.assetsFileList[0].unityVersion} - {assetsManager.assetsFileList[0].m_TargetPlatform}";
|
||||||
|
|
||||||
assetListView.VirtualListSize = visibleAssets.Count;
|
assetListView.VirtualListSize = visibleAssets.Count;
|
||||||
|
|
||||||
@@ -1484,7 +1484,7 @@ namespace AssetStudio.GUI
|
|||||||
|
|
||||||
public void ResetForm()
|
public void ResetForm()
|
||||||
{
|
{
|
||||||
Text = $"YarikStudio v{Application.ProductVersion}";
|
Text = $"Studio v{Application.ProductVersion}";
|
||||||
assetsManager.Clear();
|
assetsManager.Clear();
|
||||||
assemblyLoader.Clear();
|
assemblyLoader.Clear();
|
||||||
exportableAssets.Clear();
|
exportableAssets.Clear();
|
||||||
|
|||||||
@@ -304,10 +304,19 @@ namespace AssetStudio.GUI
|
|||||||
var preloadIndex = m_Container.Value.preloadIndex;
|
var preloadIndex = m_Container.Value.preloadIndex;
|
||||||
var preloadSize = m_Container.Value.preloadSize;
|
var preloadSize = m_Container.Value.preloadSize;
|
||||||
var preloadEnd = preloadIndex + preloadSize;
|
var preloadEnd = preloadIndex + preloadSize;
|
||||||
|
|
||||||
|
switch(preloadIndex)
|
||||||
|
{
|
||||||
|
case int n when n < 0:
|
||||||
|
Logger.Warning($"preloadIndex {preloadIndex} is out of preloadTable range");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
for (int k = preloadIndex; k < preloadEnd; k++)
|
for (int k = preloadIndex; k < preloadEnd; k++)
|
||||||
{
|
{
|
||||||
containers.Add((m_AssetBundle.m_PreloadTable[k], m_Container.Key));
|
containers.Add((m_AssetBundle.m_PreloadTable[k], m_Container.Key));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
public class OffsetStream : Stream
|
public class OffsetStream : Stream
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly Stream _baseStream;
|
private readonly Stream _baseStream;
|
||||||
private long _offset;
|
private long _offset;
|
||||||
|
|
||||||
@@ -81,13 +80,26 @@ namespace AssetStudio
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
using var reader = new FileReader(path, this, true);
|
using var reader = new FileReader(path, this, true);
|
||||||
var signature = reader.FileType switch
|
|
||||||
|
var readSignature = reader.FileType;
|
||||||
|
var signature = "";
|
||||||
|
|
||||||
|
if (readSignature == FileType.BundleFile ||
|
||||||
|
readSignature == FileType.MhyFile ||
|
||||||
|
readSignature == FileType.Blb3File)
|
||||||
{
|
{
|
||||||
FileType.BundleFile => "UnityFS\x00",
|
switch (reader.FileType)
|
||||||
FileType.MhyFile => "mhy",
|
{
|
||||||
FileType.Blb3File => "Blb\x03",
|
case FileType.BundleFile:
|
||||||
_ => throw new InvalidOperationException()
|
signature = "UnityFS\x00";
|
||||||
};
|
break;
|
||||||
|
case FileType.MhyFile:
|
||||||
|
signature = "mhy";
|
||||||
|
break;
|
||||||
|
case FileType.Blb3File:
|
||||||
|
signature = "Blb\x03";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Verbose($"Parsed signature: {signature}");
|
Logger.Verbose($"Parsed signature: {signature}");
|
||||||
|
|
||||||
@@ -109,6 +121,18 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ArrayPool<byte>.Shared.Return(buffer);
|
ArrayPool<byte>.Shared.Return(buffer);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
while (Remaining > 0)
|
||||||
|
{
|
||||||
|
Offset = AbsolutePosition;
|
||||||
|
yield return AbsolutePosition;
|
||||||
|
if (Offset == AbsolutePosition)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user