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(); } }
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(); }