pub struct SerializedFile {
pub header: SerializedFileHeader,
pub unity_version: String,
pub target_platform: i32,
pub enable_type_tree: bool,
pub types: Vec<SerializedType>,
pub big_id_enabled: bool,
pub objects: Vec<ObjectInfo>,
pub script_types: Vec<SerializedType>,
pub externals: Vec<FileIdentifier>,
pub ref_types: Vec<SerializedType>,
pub user_information: String,
/* private fields */
}
Expand description
Complete SerializedFile structure
This structure represents a complete Unity SerializedFile with all its metadata, type information, and object data.
Fields§
§header: SerializedFileHeader
File header
unity_version: String
Unity version string
target_platform: i32
Target platform
enable_type_tree: bool
Whether type tree is enabled
types: Vec<SerializedType>
Type information
big_id_enabled: bool
Whether big IDs are enabled
objects: Vec<ObjectInfo>
Object information
script_types: Vec<SerializedType>
Script types
externals: Vec<FileIdentifier>
External file references
ref_types: Vec<SerializedType>
Reference types
user_information: String
User information
Implementations§
Source§impl SerializedFile
impl SerializedFile
Sourcepub fn object_count(&self) -> usize
pub fn object_count(&self) -> usize
Get object count
Sourcepub fn type_count(&self) -> usize
pub fn type_count(&self) -> usize
Get type count
Sourcepub fn find_object(&self, path_id: i64) -> Option<&ObjectInfo>
pub fn find_object(&self, path_id: i64) -> Option<&ObjectInfo>
Find object by path ID
Sourcepub fn find_type(&self, class_id: i32) -> Option<&SerializedType>
pub fn find_type(&self, class_id: i32) -> Option<&SerializedType>
Find type by class ID
Sourcepub fn objects_of_type(&self, type_id: i32) -> Vec<&ObjectInfo>
pub fn objects_of_type(&self, type_id: i32) -> Vec<&ObjectInfo>
Get all objects of a specific type
Sourcepub fn create_type_registry(&self) -> TypeRegistry
pub fn create_type_registry(&self) -> TypeRegistry
Create a type registry from this file
Sourcepub fn statistics(&self) -> FileStatistics
pub fn statistics(&self) -> FileStatistics
Get file statistics
Sourcepub fn validate(&self) -> Result<(), BinaryError>
pub fn validate(&self) -> Result<(), BinaryError>
Validate the entire file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SerializedFile
impl RefUnwindSafe for SerializedFile
impl Send for SerializedFile
impl Sync for SerializedFile
impl Unpin for SerializedFile
impl UnwindSafe for SerializedFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more