Ejemplo n.º 1
0
 public BundleFileInstance(Stream stream, string filePath, string root, bool unpackIfPacked)
 {
     path = Path.GetFullPath(filePath);
     name = Path.Combine(root, Path.GetFileName(path));
     file = new AssetBundleFile();
     file.Read(new AssetsFileReader(stream), true);
     if (file.bundleHeader6 != null && file.bundleHeader6.GetCompressionType() != 0 && unpackIfPacked)
     {
         file = BundleHelper.UnpackBundle(file);
     }
     loadedAssetsFiles = new List <AssetsFileInstance>();
 }
 public BundleFileInstance(FileStream stream, string root, bool unpackIfPacked)
 {
     this.stream = stream;
     path        = stream.Name;
     name        = Path.Combine(root, Path.GetFileName(path));
     file        = new AssetBundleFile();
     file.Read(new AssetsFileReader(stream), true);
     if (file.bundleHeader6.GetCompressionType() != 0 && unpackIfPacked)
     {
         file = BundleHelper.UnpackBundle(file);
     }
     assetsFiles = new List <AssetsFileInstance>();
 }
Ejemplo n.º 3
0
 public BundleFileInstance(FileStream stream, string root, bool unpackIfPacked)
 {
     this.stream = stream;
     path        = stream.Name;
     name        = Path.Combine(root, Path.GetFileName(path));
     file        = new AssetBundleFile();
     file.Read(new AssetsFileReader(stream), true);
     if (file.bundleHeader6.GetCompressionType() != 0 && unpackIfPacked)
     {
         file = BundleHelper.UnpackBundle(file);
     }
     assetsFiles.AddRange(
         Enumerable.Range(0, file.bundleInf6.blockCount)
         .Select(d => (AssetsFileInstance)null)
         );
 }