Crate unity_asset_binary

Crate unity_asset_binary 

Source
Expand description

Unity Binary Asset Parser

This crate provides functionality to parse Unity binary file formats including:

  • AssetBundle files (.bundle, .unity3d)
  • Serialized Asset files (.assets)
  • Resource files

§Features

  • AssetBundle parsing: Support for UnityFS format
  • Compression support: LZ4, LZMA, and other compression formats
  • TypeTree parsing: Dynamic type information for objects
  • Object extraction: Extract Unity objects from binary data

§Feature Flags

This crate is intentionally parser-only. For decoding/export helpers (Texture/Audio/Sprite/Mesh), use the unity-asset-decode crate.

§Example

use unity_asset_binary::bundle::load_bundle_from_memory;
use std::fs;

// Load an AssetBundle file
let data = fs::read("example.bundle")?;
let bundle = load_bundle_from_memory(data)?;

// Access contained assets
for asset in &bundle.assets {
    println!("Asset with {} objects", asset.object_count());
    // Access objects in the asset
    for object in &asset.objects {
        println!("  Object: {} (type_id: {})", object.path_id, object.type_id);
    }
}

Re-exports§

pub use error::BinaryError;
pub use error::Result;

Modules§

asset
Unity asset processing module
bundle
Unity AssetBundle processing module
compression
Compression support for Unity binary files
data_view
error
Error types for Unity binary parsing
file
Unified Unity file model (UnityPy-aligned).
formats
Layered “formats” namespace (UnityPy-aligned).
metadata
Unity asset metadata processing module
object
Unity object representation and helpers.
performance
Performance Optimization and Monitoring
reader
Binary data reader for Unity files
shared_bytes
typetree
Unity TypeTree processing module
unity_objects
Unity Core Object Types
unity_version
Unity Version Management System
webfile
Unity WebFile parsing