8000 GitHub - lmmtrr/unityfs · GitHub
[go: up one dir, main page]

Skip to content
lmmtrrPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unityfs

A pure Rust library for parsing, reading, and extracting assets from Unity serialized files and AssetBundles.

Usage

Add unityfs to your Cargo.toml:

[dependencies]
unityfs = "0.1"

Then you can read asset bundles and extract assets programmatically:

use unityfs::{is_unity_bundle, extract_unity_assets};

let bundle_bytes = std::fs::read("my_model.ab").unwrap
6C02
();
if is_unity_bundle(&bundle_bytes) {
    extract_unity_assets(&bundle_bytes, "extracted_output/").unwrap();
}

Raw SerializedFiles such as sharedassets0.assets or level0 are also supported. When opened from a path, sibling .resS and .resource files are loaded automatically:

use unityfs::{is_unity_file, extract_unity_assets_from_path};

extract_unity_assets_from_path("Game_Data/sharedassets0.assets", "extracted_output/").unwrap();

When working with bytes, pass the stream files explicitly:

use unityfs::extract_unity_assets_with_resources;

let data = std::fs::read("sharedassets0.assets").unwrap();
let ress = std::fs::read("sharedassets0.assets.resS").unwrap();
extract_unity_assets_with_resources(&data, "sharedassets0.assets", vec![("sharedassets0.assets.resS".to_string(), ress)], "extracted_output/").unwrap();

Acknowledgement

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0