v0.80.30
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Buffers.Binary;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace AssetStudio
|
||||
{
|
||||
@@ -19,76 +22,64 @@ namespace AssetStudio
|
||||
|
||||
public sealed class AssetBundle : NamedObject
|
||||
{
|
||||
public static bool Exportable;
|
||||
|
||||
public PPtr<Object>[] PreloadTable;
|
||||
public KeyValuePair<string, AssetInfo>[] Container;
|
||||
public AssetInfo MainAsset;
|
||||
public uint RuntimeComaptability;
|
||||
public string AssetBundleName;
|
||||
public int DependencyCount;
|
||||
public string[] Dependencies;
|
||||
public bool IsStreamedScenessetBundle;
|
||||
public int ExplicitDataLayout;
|
||||
public int PathFlags;
|
||||
public int SceneHashCount;
|
||||
public KeyValuePair<string, string>[] SceneHashes;
|
||||
public PPtr<Object>[] m_PreloadTable;
|
||||
public KeyValuePair<string, AssetInfo>[] m_Container;
|
||||
//public AssetInfo m_MainAsset;
|
||||
//public uint m_RuntimeComaptability;
|
||||
//public string m_AssetBundleName;
|
||||
//public string[] m_Dependencies;
|
||||
//public bool m_IsStreamedSceneAssetBundle;
|
||||
//public int m_ExplicitDataLayout;
|
||||
//public int m_PathFlags;
|
||||
//public KeyValuePair<string, string>[] m_SceneHashes;
|
||||
|
||||
public AssetBundle(ObjectReader reader) : base(reader)
|
||||
{
|
||||
var m_PreloadTableSize = reader.ReadInt32();
|
||||
PreloadTable = new PPtr<Object>[m_PreloadTableSize];
|
||||
m_PreloadTable = new PPtr<Object>[m_PreloadTableSize];
|
||||
for (int i = 0; i < m_PreloadTableSize; i++)
|
||||
{
|
||||
PreloadTable[i] = new PPtr<Object>(reader);
|
||||
m_PreloadTable[i] = new PPtr<Object>(reader);
|
||||
}
|
||||
|
||||
var m_ContainerSize = reader.ReadInt32();
|
||||
Container = new KeyValuePair<string, AssetInfo>[m_ContainerSize];
|
||||
m_Container = new KeyValuePair<string, AssetInfo>[m_ContainerSize];
|
||||
for (int i = 0; i < m_ContainerSize; i++)
|
||||
{
|
||||
Container[i] = new KeyValuePair<string, AssetInfo>(reader.ReadAlignedString(), new AssetInfo(reader));
|
||||
m_Container[i] = new KeyValuePair<string, AssetInfo>(reader.ReadAlignedString(), new AssetInfo(reader));
|
||||
}
|
||||
|
||||
if (reader.Game.Name == "GI" || reader.Game.Name == "GI_CB1" || reader.Game.Name == "GI_CB2" || reader.Game.Name == "GI_CB3")
|
||||
{
|
||||
MainAsset = new AssetInfo(reader);
|
||||
RuntimeComaptability = reader.ReadUInt32();
|
||||
}
|
||||
|
||||
AssetBundleName = reader.ReadAlignedString();
|
||||
DependencyCount = reader.ReadInt32();
|
||||
Dependencies = new string[DependencyCount];
|
||||
for (int k = 0; k < DependencyCount; k++)
|
||||
{
|
||||
Dependencies[k] = reader.ReadAlignedString();
|
||||
}
|
||||
if (reader.Game.Name == "GI_CB1" || reader.Game.Name == "GI_CB2")
|
||||
{
|
||||
IsStreamedScenessetBundle = reader.ReadBoolean();
|
||||
reader.AlignStream();
|
||||
PathFlags = reader.ReadInt32();
|
||||
}
|
||||
else if (reader.Game.Name == "GI_CB3")
|
||||
{
|
||||
IsStreamedScenessetBundle = reader.ReadBoolean();
|
||||
reader.AlignStream();
|
||||
ExplicitDataLayout = reader.ReadInt32();
|
||||
PathFlags = reader.ReadInt32();
|
||||
}
|
||||
else if (reader.Game.Name == "GI")
|
||||
{
|
||||
IsStreamedScenessetBundle = reader.ReadBoolean();
|
||||
reader.AlignStream();
|
||||
ExplicitDataLayout = reader.ReadInt32();
|
||||
PathFlags = reader.ReadInt32();
|
||||
SceneHashCount = reader.ReadInt32();
|
||||
SceneHashes = new KeyValuePair<string, string>[SceneHashCount];
|
||||
for (int l = 0; l < SceneHashCount; l++)
|
||||
{
|
||||
SceneHashes[l] = new KeyValuePair<string, string>(reader.ReadAlignedString(), reader.ReadAlignedString());
|
||||
}
|
||||
}
|
||||
//if (reader.Game.Type.IsMhyGroup())
|
||||
//{
|
||||
// m_MainAsset = new AssetInfo(reader);
|
||||
// m_RuntimeComaptability = reader.ReadUInt32();
|
||||
// m_AssetBundleName = reader.ReadAlignedString();
|
||||
// var dependencyCount = reader.ReadInt32();
|
||||
// m_Dependencies = new string[dependencyCount];
|
||||
// for (int k = 0; k < dependencyCount; k++)
|
||||
// {
|
||||
// m_Dependencies[k] = reader.ReadAlignedString();
|
||||
// }
|
||||
// if (reader.Game.Type.IsGIGroup())
|
||||
// {
|
||||
// m_IsStreamedSceneAssetBundle = reader.ReadBoolean();
|
||||
// reader.AlignStream();
|
||||
// if (reader.Game.Type.IsGICB3() || reader.Game.Type.IsGI())
|
||||
// {
|
||||
// m_ExplicitDataLayout = reader.ReadInt32();
|
||||
// }
|
||||
// m_PathFlags = reader.ReadInt32();
|
||||
// if (reader.Game.Type.IsGI())
|
||||
// {
|
||||
// var sceneHashCount = reader.ReadInt32();
|
||||
// m_SceneHashes = new KeyValuePair<string, string>[sceneHashCount];
|
||||
// for (int l = 0; l < sceneHashCount; l++)
|
||||
// {
|
||||
// m_SceneHashes[l] = new KeyValuePair<string, string>(reader.ReadAlignedString(), reader.ReadAlignedString());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user