2 unstable releases
Uses new Rust 2024
| 0.2.0 | Dec 26, 2025 |
|---|---|
| 0.1.0 | Aug 27, 2025 |
#46 in #unity
Used in 3 crates
555KB
13K
SLoC
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);
}
}
Dependencies
~14MB
~403K SLoC