mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed
This commit is contained in:
parent
3442b39784
commit
40b191f039
@ -113,14 +113,17 @@ namespace AssetStudio
|
||||
|
||||
for (int i = 0; i < objectCount; i++)
|
||||
{
|
||||
//each table entry is aligned individually, not the whole table
|
||||
if (header.m_Version >= 14)
|
||||
AssetPreloadData asset = new AssetPreloadData();
|
||||
|
||||
if (header.m_Version < 14)
|
||||
{
|
||||
asset.m_PathID = reader.ReadInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
reader.AlignStream(4);
|
||||
asset.m_PathID = reader.ReadInt64();
|
||||
}
|
||||
|
||||
AssetPreloadData asset = new AssetPreloadData();
|
||||
asset.m_PathID = header.m_Version < 14 ? reader.ReadInt32() : reader.ReadInt64();
|
||||
asset.Offset = reader.ReadUInt32();
|
||||
asset.Offset += header.m_DataOffset;
|
||||
asset.Size = reader.ReadInt32();
|
||||
@ -180,7 +183,15 @@ namespace AssetStudio
|
||||
{
|
||||
var m_ScriptType = new LocalSerializedObjectIdentifier();
|
||||
m_ScriptType.localSerializedFileIndex = reader.ReadInt32();
|
||||
m_ScriptType.localIdentifierInFile = header.m_Version < 14 ? reader.ReadInt32() : reader.ReadInt64();
|
||||
if (header.m_Version < 14)
|
||||
{
|
||||
m_ScriptType.localIdentifierInFile = reader.ReadInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
reader.AlignStream(4);
|
||||
m_ScriptType.localIdentifierInFile = reader.ReadInt64();
|
||||
}
|
||||
m_ScriptTypes.Add(m_ScriptType);
|
||||
}
|
||||
}
|
||||
@ -204,6 +215,11 @@ namespace AssetStudio
|
||||
m_Externals.Add(m_External);
|
||||
}
|
||||
|
||||
if (header.m_Version >= 5)
|
||||
{
|
||||
//var userInformation = reader.ReadStringToNull();
|
||||
}
|
||||
|
||||
buildType = Regex.Replace(unityVersion, @"\d", "").Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var firstVersion = int.Parse(unityVersion.Split('.')[0]);
|
||||
version = Regex.Matches(unityVersion, @"\d").Cast<Match>().Select(m => int.Parse(m.Value)).ToArray();
|
||||
|
@ -20,7 +20,7 @@ namespace AssetStudio
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_FileID > 0)
|
||||
if (m_FileID > 0 && m_FileID - 1 < assetsFile.m_Externals.Count)
|
||||
{
|
||||
if (index == -2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user