From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XUtliPoolLib/AssetBundleDataBinaryReader.cs | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs (limited to 'Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs') diff --git a/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs b/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs new file mode 100644 index 00000000..99f43f0a --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs @@ -0,0 +1,43 @@ +using System; + +namespace XUtliPoolLib +{ + internal class AssetBundleDataBinaryReader : AssetBundleDataReader + { + public override void Read(XBinaryReader reader) + { + for (;;) + { + bool isEof = reader.IsEof; + if (isEof) + { + break; + } + uint num = reader.ReadUInt32(); + uint key = reader.ReadUInt32(); + byte compositeType = reader.ReadByte(); + byte b = reader.ReadByte(); + uint[] array = null; + bool flag = b > 0; + if (flag) + { + array = new uint[(int)b]; + } + bool flag2 = !this.shortName2FullName.ContainsKey(key); + if (flag2) + { + this.shortName2FullName.Add(key, num); + } + for (int i = 0; i < (int)b; i++) + { + array[i] = reader.ReadUInt32(); + } + AssetBundleData assetBundleData = new AssetBundleData(); + assetBundleData.fullName = num; + assetBundleData.dependencies = array; + assetBundleData.compositeType = (AssetBundleExportType)compositeType; + this.infoMap[num] = assetBundleData; + } + } + } +} -- cgit v1.1-26-g67d0