AssetStudioMod Documentation

repository·AssetStudioMod·Indexed 24 days ago

https://github.com/aelurum/assetstudio

A modified version of Perfare's AssetStudio for inspecting and extracting assets from Unity games. It features optimized UI performance and enhancements such as Live2D Cubism export, WebP support, and Switch texture deswizzling. Includes documentation for the GUI and AssetStudioModCLI, a command-line tool for extracting asset types like Texture2D, Sprite, AudioClip, Mesh, and Animator with support for advanced filtering, grouping, and FBX export settings.

Tokens
2.7K
Snippets
3
Records
15
Agent score
34%

What's inside AssetStudioMod

  1. Install AssetStudioMod requirements

    AssetStudioMod

    Depending on which version of AssetStudioMod you are using, you must install the corresponding .NET runtime:

  2. GUI Usage: Exporting MonoBehaviour assets

    AssetStudioMod

    When you select a MonoBehaviour asset for the first time, AssetStudioMod will prompt you to select the directory where the assembly is located (e.g., the Managed folder).

    For Il2Cpp projects:

    1. Use Il2CppDumper to generate dummy DLLs.
    2. When prompted by AssetStudioMod, select the folder containing these dummy DLLs as the assembly directory.
  3. GUI Usage: Exporting Animators and Models with AnimationClips

    AssetStudioMod

    To export complex animation data in the GUI:

    • Exporting a Model with AnimationClip:

      1. Select the model in the Scene Hierarchy.
      2. Select the desired AnimationClip from the Asset List.
      3. Use Model -> Export selected objects with AnimationClip.
    • Exporting an Animator with AnimationClip:

      1. Select the Animator in the Asset List.
      2. Use Ctrl + Click to select both the Animator and the AnimationClip from the Asset List.
      3. Use Export -> Export Animator with selected AnimationClip.
  4. Use AssetStudioModCLI for asset extraction and export

    AssetStudioMod

    AssetStudioModCLI is a command-line tool used to extract and export assets from Unity asset bundles. It supports various asset types including Texture2D, Sprite, AudioClip, Mesh, and Animator.

    Basic Syntax:

    AssetStudioModCLI <input path to asset file(s)/folder> [options]

    Common Workflow:

    1. Info Mode: Use -m info to see how many assets are available for export before starting a large job.
    2. Export Mode: Use -m export (default) to convert and export assets to a folder.
    3. Extract Mode: Use -m extract to decompress asset bundles.
    4. Output: Specify a destination with -o <path>. If omitted, assets are saved to an ASExport folder in the working directory.
  5. Run AssetStudioMod CLI

    AssetStudioMod

    To run the CLI, use the executable directly or use dotnet for portable versions (.NET 6+).

    Standard command: AssetStudioModCLI <asset folder path>

    Portable version (.NET 6+): dotnet AssetStudioModCLI.dll <asset folder path>

    AssetStudioModCLI <asset folder path>
    # or
    dotnet AssetStudioModCLI.dll <asset folder path>
  6. Advanced CLI filtering and exporting

    AssetStudioMod

    Use these advanced flags to perform complex queries and specialized exports.

    • Export images as WebP: AssetStudioModCLI <asset folder path> -o <output folder path> -t sprite,tex2d --image-format webp

    • Filter by name (e.g., find audio with 'voice' in name): AssetStudioModCLI <asset folder path> -m info -t audio --filter-by-name voice

    • Filter by multiple names (OR logic): AssetStudioModCLI <asset folder path> -t audio --filter-by-name music,voice

    • Filter by text in containers: AssetStudioModCLI <asset folder path> -t audio --filter-by-text char

    • Filter by name AND container: AssetStudioModCLI <asset folder path> -t audio --filter-by-name voice --filter-by-container char

    • Export FBX with scale factor: AssetStudioModCLI <asset folder path> -m splitObjects --filter-by-name model,scene --fbx-scale-factor 10

    • Export MonoBehaviour with assembly folder: AssetStudioModCLI <asset folder path> -t monobehaviour --assembly-folder <assembly folder path> --log-output both

    • Specify Unity version: AssetStudioModCLI <asset folder path> --unity-version 2017.4.39f1

    • Load all assets and dump Materials: AssetStudioModCLI <asset folder path> -m dump -t material --load-all

    AssetStudioModCLI <asset folder path> -o <output folder path> -t sprite,tex2d --image-format webp
    AssetStudioModCLI <asset folder path> -m info -t audio --filter-by-name voice
    AssetStudioModCLI <asset folder path> -t audio --filter-by-name music,voice
    AssetStudioModCLI <asset folder path> -t audio --filter-by-text char
    AssetStudioModCLI <asset folder path> -t audio --filter-by-name voice --filter-by-container char
    AssetStudioModCLI <asset folder path> -m splitObjects --filter-by-name model,scene --fbx-scale-factor 10
    AssetStudioModCLI <asset folder path> -t monobehaviour --assembly-folder <assembly folder path> --log-output both
    AssetStudioModCLI <asset folder path> --unity-version 2017.4.39f1
    AssetStudioModCLI <asset folder path> -m dump -t material --load-all
  7. GUI Usage: Loading and Extracting Assets

    AssetStudioMod

    In the GUI version of AssetStudioMod, use the following workflows:

    • Loading Assets/AssetBundles: Use File -> Load file or File -> Load folder. Warning: Loading AssetBundles directly into memory can consume significant RAM.

    • Extracting/Decompressing AssetBundles: To avoid high memory usage, use File -> Extract file or File -> Extract folder to decompress AssetBundles to a local directory before reading them.

    • Exporting Assets and Live2D models: Use the Export menu.

    • Exporting Models: Use the Model menu from the "Scene Hierarchy" view.

  8. Basic CLI asset export commands

    AssetStudioMod

    Use these commands to perform common asset extraction tasks via the CLI.

    • Show asset counts by type: AssetStudioModCLI <asset folder path> -m info

    • Export all supported assets: AssetStudioModCLI <asset folder path>

    • Export specific types (comma-separated): AssetStudioModCLI <asset folder path> -t tex2d,sprite,audio

    • Export assets grouped by type: AssetStudioModCLI <asset folder path> -g type

    • Export to a specific output folder: AssetStudioModCLI <asset folder path> -o <output folder path>

    • Dump assets to a specific folder: AssetStudioModCLI <asset folder path> -m dump -o <output folder path>

    • Export Live2D Cubism models: AssetStudioModCLI <asset folder path> -m live2d (Note: Only --filter-by-name is supported in live2d mode)

    • Export all FBX objects (split mode): AssetStudioModCLI <asset folder path> -m splitObjects (Note: Only --filter-by-name is supported in splitObjects mode)

    • Export Animator assets: AssetStudioModCLI <asset folder path> -m animator

    AssetStudioModCLI <asset folder path> -m info
    AssetStudioModCLI <asset folder path>
    AssetStudioModCLI <asset folder path> -t tex2d,sprite,audio
    AssetStudioModCLI <asset folder path> -g type
    AssetStudioModCLI <asset folder path> -o <output folder path>
    AssetStudioModCLI <asset folder path> -m dump -o <output folder path>
    AssetStudioModCLI <asset folder path> -m live2d
    AssetStudioModCLI <asset folder path> -m splitObjects
    AssetStudioModCLI <asset folder path> -m animator
  9. Configure decompression and compression settings

    AssetStudioMod

    For handling compressed asset bundles, use these advanced options:

    Block Compression:

    • --blockinfo-comp <value>: Compression type for blockInfo data (auto (default), zstd, oodle, lz4, lzma).
    • --block-comp <value>: Compression type for block data (auto (default), zstd, oodle, lz4, lzma).

    Decompression Behavior:

    • --decompress-to-disk: (Flag) If not specified, only bundles larger than 2GB are decompressed to disk; otherwise, they are decompressed in RAM.
  10. Configure asset grouping and naming

    AssetStudioMod

    Control how exported files are organized and named using the following options:

    Grouping (-g, --group-option <value>):

    • none: No grouping.
    • type: Group by type name.
    • container (default): Group by container path.
    • containerFull: Group by full container path (e.g., including prefab name).
    • fileName: Group by source file name.
    • sceneHierarchy: Group by node path in scene hierarchy.

    Naming (-f, --filename-format <value>):

    • assetName (default): assetName.extension
    • assetName_pathID: assetName @pathID.extension
    • pathID: pathID.extension
  11. Filter and select specific asset types

    AssetStudioMod

    You can control which assets are processed using the -t, --asset-type and filtering options.

    Asset Types (-t): Specify types using tex2d, tex2dArray, sprite, textAsset, monoBehaviour, font, shader, movieTexture, audio, video, or mesh. Use all (default) to export everything. Multiple types must be separated by , or ; without spaces.

    Filtering Options:

    • --filter-by-name <text>: Filter by name or regex.
    • --filter-by-container <text>: Filter by container or regex.
    • --filter-by-pathid <text>: Filter by specific PathIDs.
    • --filter-by-text <text>: Search for text within names or containers.
    • --filter-with-regex: Enables regular expression handling for the filters above (does not apply to --filter-by-pathid).