Fixed some bugs

This commit is contained in:
Perfare 2017-02-10 03:49:13 +08:00
parent 256eeb8f7c
commit 2357e55337
2 changed files with 12 additions and 4 deletions

View File

@ -273,9 +273,13 @@ namespace Unity_Studio
private void readBase5() private void readBase5()
{ {
int classID = a_Stream.ReadInt32(); int classID = a_Stream.ReadInt32();
if (classID < 0) { a_Stream.Position += 16; }
if (fileGen > 15) if (fileGen > 15)
{ {
if (classID == 0)//TODO 暂时用这种方法解决
{
a_Stream.Position += 12;
classID = a_Stream.ReadInt32();
}
a_Stream.ReadByte(); a_Stream.ReadByte();
int type1; int type1;
if ((type1 = a_Stream.ReadInt16()) >= 0) if ((type1 = a_Stream.ReadInt16()) >= 0)
@ -290,6 +294,10 @@ namespace Unity_Studio
classIDs.Add(new int[] { type1, classID }); classIDs.Add(new int[] { type1, classID });
classID = type1; classID = type1;
} }
else if (classID < 0)
{
a_Stream.Position += 16;
}
a_Stream.Position += 16; a_Stream.Position += 16;
if (baseDefinitions) if (baseDefinitions)

View File

@ -7,8 +7,8 @@ namespace Unity_Studio
{ {
public class PlayerSettings public class PlayerSettings
{ {
public string companyName = ""; public string companyName;
public string productName = ""; public string productName;
public PlayerSettings(AssetPreloadData preloadData) public PlayerSettings(AssetPreloadData preloadData)
{ {
@ -17,7 +17,7 @@ namespace Unity_Studio
a_Stream.Position = preloadData.Offset; a_Stream.Position = preloadData.Offset;
if ((sourceFile.version[0] == 5 && sourceFile.version[1] >= 5) || sourceFile.version[0] > 5)//5.5.0 nad up if ((sourceFile.version[0] == 5 && sourceFile.version[1] >= 4) || sourceFile.version[0] > 5)//5.4.0 nad up
{ {
//productGUID //productGUID
a_Stream.ReadInt32(); a_Stream.ReadInt32();