Module bundle

Module bundle 

Source
Expand description

Unity AssetBundle processing module

This module provides comprehensive AssetBundle processing capabilities, organized following UnityPy and unity-rs best practices.

§Architecture

The module is organized into several sub-modules:

  • header - Bundle header parsing and validation
  • types - Core data structures (AssetBundle, BundleFileInfo, etc.)
  • compression - Compression handling (LZ4, LZMA, Brotli)
  • parser - Main parsing logic for different bundle formats
  • loader - Resource loading and management

§Examples

use unity_asset_binary::bundle::{BundleLoader, BundleLoadOptions};

// Simple bundle loading
let bundle = unity_asset_binary::bundle::load_bundle("example.bundle")?;
println!("Loaded bundle with {} assets", bundle.asset_count());

// Advanced loading with options
let mut loader = BundleLoader::with_options(BundleLoadOptions::fast());
let bundle = loader.load_from_file("example.bundle")?;

// Find specific assets
let texture_assets = loader.find_assets_by_name("texture");

Modules§

compression
Bundle compression handling
header
AssetBundle header parsing
loader
Bundle resource loading and management
parser
Bundle parser implementation
types
Bundle data structures

Structs§

AssetBundle
A Unity AssetBundle
BundleCompression
Bundle compression handler
BundleFileInfo
Information about a file within the bundle
BundleFormatInfo
Bundle format information
BundleHeader
AssetBundle header information
BundleInfo
Bundle information summary
BundleLoadOptions
Bundle loading options
BundleLoader
Bundle resource loader
BundleParser
Main bundle parser
BundleProcessor
Main bundle processing facade
BundleResourceManager
Bundle resource manager
BundleStatistics
Bundle statistics
CompressionOptions
Compression options for bundle processing
CompressionStats
Compression statistics
DirectoryNode
Directory node in the bundle
LoaderStatistics
Loader statistics
ParsingComplexity
Parsing complexity information

Functions§

create_processor
Convenience functions for common operations Create a bundle processor with default settings
extract_file_from_bundle
Quick function to extract a specific file from bundle
get_bundle_info
Quick function to get bundle information
get_supported_formats
Get supported bundle formats
is_valid_bundle
Check if a file is a valid Unity bundle
list_bundle_contents
Quick function to list bundle contents
load_bundle
Convenience functions for quick bundle loading Load a single bundle from file
load_bundle_from_memory
Load a bundle from memory
load_bundle_with_options
Load a bundle with specific options