blob: beab8a11a46b41f4e94c9cf81ced6dc807aae5c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use std::{env::args, fs::File, io::BufReader};
use unity_tools::{serialized_file::read_serialized_file, unityfs::UnityFS};
fn main() -> anyhow::Result<()> {
env_logger::init_from_env("LOG");
let file = BufReader::new(File::open(args().nth(1).unwrap())?);
let mut fs = UnityFS::open(file)?;
for node in fs.nodes().to_vec() {
if node.name.ends_with(".resource") || node.name.ends_with(".resS") {
continue;
}
let cab = fs.read(&node)?;
// let mut writer = File::create(format!("/tmp/{}", node.name))?;
// std::io::copy(&mut cab, &mut writer)?;
// continue;
let file = read_serialized_file(cab)?;
}
Ok(())
}
|