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 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)
 {
     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
 }
Esempio n. 4
0
 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
 }