文本文件格式说明 *固定一行字符串ABDT 循环 { AssetBundleData *名字(string) *短名字(string) *Hash值(string) *类型(AssetBundleExportType) *依赖文件个数M(int) 循环 M { *依赖的AB文件名(string) } }
示例#1
0
        public void Init(Stream depStream, Action callback)
        {
            if (depStream.Length > 4)
            {
                BinaryReader br = new BinaryReader(depStream);
                if (br.ReadChar() == 'A' && br.ReadChar() == 'B' && br.ReadChar() == 'D')
                {
                    if (br.ReadChar() == 'T')
                    {
                        _depInfoReader = new AssetBundleDataReader();
                    }
                    else
                    {
                        _depInfoReader = new AssetBundleDataBinaryReader();
                    }

                    depStream.Position = 0;
                    _depInfoReader.Read(depStream);
                }
            }

            depStream.Close();

            if (callback != null)
            {
                callback();
            }
        }
示例#2
0
        public void Init(Stream depStream, Action callback)
        {
            if (depStream.Length > 4)
            {
                BinaryReader br = new BinaryReader(depStream);
                if (br.ReadChar() == 'A' && br.ReadChar() == 'B' && br.ReadChar() == 'D')
                {
                    if (br.ReadChar() == 'T')
                        _depInfoReader = new AssetBundleDataReader();
                    else
                        _depInfoReader = new AssetBundleDataBinaryReader();

                    depStream.Position = 0;
                    _depInfoReader.Read(depStream);
                }
            }

            depStream.Close();

            if (callback != null)
                callback();
        }