use crate::{ common_strings::COMMON_STRINGS, helper::{AlignExt, Endianness, ReadExt}, object::Value, unityfs::{UnityFS, header::NodeInfo}, }; use anyhow::{Result, anyhow, bail}; use log::{debug, info, trace, warn}; use std::io::{Cursor, Read, Seek, SeekFrom}; #[derive(Debug, Clone)] pub struct TypeTreeNode { pub version: u16, pub level: u8, pub type_flags: u8, pub type_string: String, pub name_string: String, pub byte_size: i32, pub index: i32, pub flags: i32, pub ref_type_hash: u64, pub children: Vec, } #[derive(Debug)] pub struct SeralizedType { pub class_id: i32, pub stripped_type: bool, pub script_type_index: i16, pub script_id: u128, pub type_tree: Option, pub type_deps: Vec, } #[derive(Debug, Clone)] pub struct ObjectInfo { pub path_id: i64, pub data_offset: u64, pub data_size: u32, pub type_id: i32, } #[derive(Debug)] pub struct Script { pub file_index: u32, pub identifier: i64, } #[derive(Debug)] pub struct External { pub something: String, pub guid: u128, pub r#type: i32, pub path_name: String, } pub struct SerializedFile { pub file: T, pub file_source_id: usize, pub header: SerializedFileHeader, pub types: Vec, pub externals: Vec, pub scripts: Vec