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 validationtypes- Core data structures (AssetBundle, BundleFileInfo, etc.)compression- Compression handling (LZ4, LZMA, Brotli)parser- Main parsing logic for different bundle formatsloader- 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");Re-exports§
pub use compression::BundleCompression;pub use compression::CompressionOptions;pub use compression::CompressionStats;pub use header::BundleFormatInfo;pub use header::BundleHeader;pub use loader::BundleLoader;pub use loader::BundleResourceManager;pub use loader::LoaderStatistics;pub use loader::load_bundle;pub use loader::load_bundle_from_memory;pub use loader::load_bundle_with_options;pub use parser::BundleParser;pub use parser::ParsingComplexity;pub use types::AssetBundle;pub use types::BundleFileInfo;pub use types::BundleLoadOptions;pub use types::BundleStatistics;pub use types::DirectoryNode;
Modules§
- compression
- Bundle compression handling
- header
- AssetBundle header parsing
- loader
- Bundle resource loading and management
- parser
- Bundle parser implementation
- types
- Bundle data structures
Structs§
- Bundle
Info - Bundle information summary
- Bundle
Processor - Main bundle processing facade
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