Some improvements
This commit is contained in:
@@ -621,9 +621,8 @@ namespace AssetStudio
|
||||
public GenericBinding FindBinding(int index)
|
||||
{
|
||||
int curves = 0;
|
||||
for (int i = 0; i < genericBindings.Count; i++)
|
||||
foreach (var b in genericBindings)
|
||||
{
|
||||
GenericBinding b = genericBindings[i];
|
||||
curves += b.attribute == 2 ? 4 : b.attribute <= 4 ? 3 : 1;
|
||||
if (curves > index)
|
||||
{
|
||||
@@ -633,17 +632,6 @@ namespace AssetStudio
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public GenericBinding FindBinding(uint path, uint attribute)
|
||||
{
|
||||
return genericBindings.Find
|
||||
(
|
||||
delegate (GenericBinding b)
|
||||
{
|
||||
return b.path == path && b.attribute == attribute;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class AnimationClip
|
||||
|
||||
@@ -40,13 +40,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
version5 = sourceFile.version[0] >= 5;
|
||||
if (sourceFile.version[0] < 5)
|
||||
|
||||
@@ -15,13 +15,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
|
||||
if (readSwitch)
|
||||
|
||||
@@ -33,13 +33,6 @@ namespace AssetStudio
|
||||
|
||||
uniqueID = preloadData.uniqueID;
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
int m_Component_size = reader.ReadInt32();
|
||||
for (int j = 0; j < m_Component_size; j++)
|
||||
{
|
||||
|
||||
@@ -40,13 +40,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
m_Shader = sourceFile.ReadPPtr();
|
||||
|
||||
|
||||
@@ -16,13 +16,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
m_Mesh = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
@@ -22,13 +22,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
|
||||
if (sourceFile.version[0] < 5)
|
||||
|
||||
@@ -18,13 +18,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
|
||||
if (readSwitch)
|
||||
|
||||
@@ -17,13 +17,6 @@ namespace AssetStudio
|
||||
var version = preloadData.sourceFile.version;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
if (sourceFile.version[0] < 5)
|
||||
{
|
||||
|
||||
@@ -16,13 +16,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
|
||||
if (readSwitch)
|
||||
|
||||
@@ -45,13 +45,6 @@ namespace AssetStudio
|
||||
var reader = preloadData.InitReader();
|
||||
var version = sourceFile.version;
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_Name = reader.ReadAlignedString();
|
||||
if (version[0] > 2017 || (version[0] == 2017 && version[1] >= 3))//2017.3 and up
|
||||
{
|
||||
|
||||
@@ -19,13 +19,6 @@ namespace AssetStudio
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var reader = preloadData.InitReader();
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = reader.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
m_LocalRotation = new[] { reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle() };
|
||||
m_LocalPosition = new[] { reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle() };
|
||||
|
||||
Reference in New Issue
Block a user