资源简介

AssetStudio V0.16.0 源代码 ,使用VS2019

AssetStudio是用于解包UNITY3D 的AssetBundle包并能导出内部资源的工具

使用VS2019开发工具打开,需要安装FBX SDK,并设置好FBK

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using static AssetStudio.ImportHelper;

namespace AssetStudio
{
    public class AssetsManager
    {
        public string SpecifyUnityVersion;
        public List assetsFileList = new List();

        internal Dictionary assetsFileIndexCache = new Dictionary(StringComparer.OrdinalIgnoreCase);
        internal Dictionary resourceFileReaders = new Dictionary(StringComparer.OrdinalIgnoreCase);

        private List importFiles = new List();
        private HashSet importFilesHash = new HashSet(StringComparer.OrdinalIgnoreCase);
        private HashSet assetsFileListHash = new HashSet(StringComparer.OrdinalIgnoreCase);

        public void LoadFiles(params string[] files)
        {
            var path = Path.GetDirectoryName(Path.GetFullPath(files[0]));
            MergeSplitAssets(path);
            var toReadFile = ProcessingSplitFiles(files.ToList());
            Load(toReadFile);
        }

        public void LoadFolder(string path)
        {
            MergeSplitAssets(path true);
            var files = Directory.GetFiles(path “*.*“ SearchOption.AllDirectories).ToList();
            var toReadFile = ProcessingSplitFiles(files);
            Load(toReadFile);
        }

        private void Load(string[] files)
        {
            foreach (var file in files)
            {
                importFiles.Add(file);
                importFilesHash.Add(Path.GetFileName(file));
            }

            Progress.Reset();
            //use a for loop because list size can change
            for (var i = 0; i < importFiles.Count; i++)
            {
                LoadFile(importFiles[i]);
                Progress.Report(i + 1 importFiles.Count);
            }

            importFiles.Clear();
            importFilesHash.Clear();
            assetsFileListHash.Clear();

            ReadAssets();
            ProcessAssets();
        }

        private void LoadFile(string fullName)
        {
            var reader = new FileReader(fullName);
            LoadFile(reader);
        }

        private void LoadFile(FileReader reader)
        {
            switch (reader.FileType)
            {
                case FileType.AssetsFile:
                    LoadAssetsFile(reader);
                    break;
                case FileType.BundleFile:
                    LoadBundleFile(reader);
                    break;
                case FileType.WebFile:
                    LoadWebFile(reader);
                    break;
                case FileType.GZipFile:
                    LoadFile(DecompressGZip(reader));
                    break;
                case FileType.BrotliFile:
                    LoadFile(DecompressBrotli(reader));
                    break;
            }
        }

        private 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2021-12-03 18:05  AssetStudio-master\
     文件        2518  2021-12-03 18:05  AssetStudio-master\.gitattributes
     文件        5745  2021-12-03 18:05  AssetStudio-master\.gitignore
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio.PInvoke\
     文件         406  2021-12-03 18:05  AssetStudio-master\AssetStudio.PInvoke\AssetStudio.PInvoke.csproj
     文件        4548  2021-12-03 18:05  AssetStudio-master\AssetStudio.PInvoke\DllLoader.cs
     文件        2302  2021-12-03 18:05  AssetStudio-master\AssetStudio.PInvoke\Utf8StringHandle.cs
     文件        9999  2021-12-03 18:05  AssetStudio-master\AssetStudio.sln
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Common\
     文件        1112  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Common\CRC.cs
     文件        6642  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Common\CommandLineParser.cs
     文件        1318  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Common\InBuffer.cs
     文件         897  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Common\OutBuffer.cs
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZ\
     文件         552  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZ\IMatchFinder.cs
     文件        9270  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZ\LzBinTree.cs
     文件        3779  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZ\LzInWindow.cs
     文件        2104  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZ\LzOutWindow.cs
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZMA\
     文件        2696  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZMA\Lzmabase.cs
     文件       11677  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZMA\LzmaDecoder.cs
     文件       43744  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\LZMA\LzmaEncoder.cs
     目录           0  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\RangeCoder\
     文件        3956  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\RangeCoder\RangeCoder.cs
     文件        3155  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\RangeCoder\RangeCoderBit.cs
     文件        3368  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\Compress\RangeCoder\RangeCoderBitTree.cs
     文件        3605  2021-12-03 18:05  AssetStudio-master\AssetStudio\7zip\ICoder.cs
     文件         332  2021-12-03 18:05  AssetStudio-master\AssetStudio\AssetStudio.csproj
............此处省略252个文件信息

评论

共有 条评论