public void Read(ByteArray bs) { signature = bs.ReadStringNull(); streamVersion = bs.ReadInt(); unityVersion = bs.ReadStringNull(); unityRevision = bs.ReadStringNull(); minimumStreamedBytes = bs.ReadInt(); headerSize = bs.ReadUInt(); numberOfLevelsToDownload = bs.ReadInt(); int numberOfLevels = bs.ReadInt(); for (int i = 0; i < numberOfLevels; i++) { levelByteEnd.Add(new LevelInfo() { PackSize = bs.ReadUInt(), UncompressedSize = bs.ReadUInt() }); } if (streamVersion >= 2) { completeFileSize = bs.ReadUInt(); } if (streamVersion >= 3) { dataHeaderSize = bs.ReadUInt(); } bs.ReadByte(); }
public void Read(ByteArray inData, AssetHeader assetHeader) { if (assetHeader.GetVersion() >= 7) { inData.ReadStringNull(); attributes = inData.ReadInt(); } int numBaseClasses = inData.ReadInt(); Debug.Log("numBaseClasses:" + numBaseClasses); for (int i = 0; i < numBaseClasses; i++) { int classID = inData.ReadInt(); FieldTypeNode node = new FieldTypeNode(); node.Read(inData); typeMap.Add(classID, node); } // padding if (assetHeader.GetVersion() >= 7) { inData.ReadInt(); } }
public void Read(ByteArray inData) { type = inData.ReadStringNull(); name = inData.ReadStringNull(); size = inData.ReadInt(); index = inData.ReadInt(); isArray = inData.ReadInt(); version = inData.ReadInt(); metaFlag = inData.ReadInt(); }
public void Read(ByteArray inData) { metadataSize = inData.ReadInt(); fileSize = inData.ReadUInt(); assetVersion = inData.ReadInt(); dataOffset = inData.ReadUInt(); if (assetVersion >= 9) { endianness = inData.ReadByte(); inData.ReadBytes(reserved, 0, 3); } Debug.Log(string.Format("metadataSize={0},fileSize={1},versionInfo={2},dataOffset={3}", metadataSize, fileSize, assetVersion, dataOffset)); //4*5=20 }
public void Read(ByteArray inData) { offset = inData.ReadUInt(); length = inData.ReadUInt(); typeID = inData.ReadInt(); classID = inData.ReadShort(); isDestroyed = inData.ReadShort(); Debug.Log(string.Format("offset={0},length={1},typeID={2},classID={3},isDestroyed={4}", offset, length, typeID, classID, isDestroyed)); }
public void Read(ByteArray inData) { type.Read(inData); int numChildren = inData.ReadInt(); for (int i = 0; i < numChildren; i++) { FieldTypeNode child = new FieldTypeNode(); child.Read(inData); list.Add(child); } }
public void Read(ByteArray inData, AssetHeader assetHeader) { if (assetHeader.GetVersion() > 5) { assetPath = inData.ReadStringNull(); } guid_high = inData.ReadLong(); guid_low = inData.ReadLong(); type = inData.ReadInt(); filePath = inData.ReadStringNull(); Debug.Log(string.Format("assetPath={0},filePath={1},type={3}", assetPath, filePath, type)); }
public void Read(ByteArray inData, AssetHeader assetHeader) { if (assetHeader.GetVersion() > 5) { assetPath = inData.ReadStringNull(); } guid_high = inData.ReadLong(); guid_low = inData.ReadLong(); type = inData.ReadInt(); filePath = inData.ReadStringNull(); Debug.Log(string.Format("assetPath={0},filePath={1},type={3}",assetPath,filePath,type)); }
public void Read(ByteArray inData) { uint entries = inData.ReadUInt(); //移动端没有该数据 Debug.Log("ObjectInfoTable:"+entries); for (int i = 0; i < entries; i++) { int pathId = inData.ReadInt(); Debug.Log("pathID:" + pathId); ObjectInfo info = new ObjectInfo(); info.Read(inData); infoMap.Add(pathId, info); } }
public void Read(ByteArray inData) { uint entries = inData.ReadUInt(); //移动端没有该数据 Debug.Log("ObjectInfoTable:" + entries); for (int i = 0; i < entries; i++) { int pathId = inData.ReadInt(); Debug.Log("pathID:" + pathId); ObjectInfo info = new ObjectInfo(); info.Read(inData); infoMap.Add(pathId, info); } }