Skip to content

lmmtrr/unityfs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unityfs-cli

A CLI tool to extract assets and dump metadata from Unity asset bundles.

Features

  • Asset Extraction:
    • AudioClip -> .ogg / .wav / .mp3 / etc.
    • Mesh -> .obj
    • Shader -> .shader
    • TextAsset -> .txt
    • Texture2D -> .png
    • VideoClip -> .mp4 / etc.
  • Metadata Extraction (--metadata / -m):
    • Dumps structural JSON data for GameObject, Transform, Material, MonoBehaviour, and AnimationClip types.
  • Live2D Reconstruction (--live2d / -l):
    • Reconstructs and merges Live2D model assets (.moc3, textures, physics, expressions, motions) into dedicated model folders.

Usage

Basic Extraction

unityfs-cli <PATH_TO_BUNDLE>

Command-line Options

  • -o, --output <DIR>: Specifies the output root directory (Default: ./out).
  • -n, --name <NAME>: Filters assets to extract by name (case-insensitive substring match).
  • -t, --type <TYPE>: Filters assets to extract by type (case-insensitive substring match, e.g., texture2d, audioclip).
  • -b, --by-file: Extracts assets directly into subdirectories named after each bundle file, without creating separate asset class subfolders (e.g., out/bundle_name/file.png instead of out/Texture2D/file.png).
  • -m, --metadata: Enables JSON metadata dump for GameObjects, Transforms, Materials, MonoBehaviours, and AnimationClips.
  • -l, --live2d: Reconstructs and merges Live2D models from extracted assets.

Examples

# Extract only Texture2D files containing "character" in their name:
unityfs-cli -t texture2d -n character path/to/bundle.ab

# Extract assets into subdirectories named after the bundle file (without type subfolders):
unityfs-cli -b path/to/bundle.ab

Interactive Mode

Launch the interactive terminal window by running the CLI without passing any input paths:

unityfs-cli

Drag and drop your file or folder directly into the terminal window and press Enter to extract. Type q or exit to close the interactive session.

Building the CLI

Standard Build

# Debug build (faster compilation)
cargo build

# Release build (highly optimized)
cargo build --release

SIMD Hardware Acceleration Build (Highly Recommended)

To maximize decompression and extraction performance, it is recommended to compile the binary with native target CPU instruction sets enabled (e.g., AVX2 or NEON):

  • Windows (PowerShell):

    $env:RUSTFLAGS="-C target-cpu=native"
    cargo build --release
  • Linux / macOS (Bash):

    RUSTFLAGS="-C target-cpu=native" cargo build --release

License

MIT License

About

A CLI tool to extract assets from Unity asset bundles.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages