pub struct AssetProcessor { /* private fields */ }Expand description
Main asset processing facade
This struct provides a high-level interface for asset processing, combining parsing and type management functionality.
Implementations§
Source§impl AssetProcessor
impl AssetProcessor
Sourcepub fn parse_from_bytes(&mut self, data: Vec<u8>) -> Result<()>
pub fn parse_from_bytes(&mut self, data: Vec<u8>) -> Result<()>
Parse SerializedFile from binary data
Sourcepub fn parse_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
pub fn parse_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Parse SerializedFile from file path
Sourcepub fn file(&self) -> Option<&SerializedFile>
pub fn file(&self) -> Option<&SerializedFile>
Get the loaded SerializedFile
Sourcepub fn file_mut(&mut self) -> Option<&mut SerializedFile>
pub fn file_mut(&mut self) -> Option<&mut SerializedFile>
Get mutable access to the loaded SerializedFile
Sourcepub fn objects_of_type(&self, type_id: i32) -> Vec<&ObjectInfo>
pub fn objects_of_type(&self, type_id: i32) -> Vec<&ObjectInfo>
Get objects of a specific type
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 statistics(&self) -> Option<FileStatistics>
pub fn statistics(&self) -> Option<FileStatistics>
Get file statistics
Sourcepub fn create_type_registry(&self) -> Option<TypeRegistry>
pub fn create_type_registry(&self) -> Option<TypeRegistry>
Create a type registry from the loaded file
Sourcepub fn unity_version(&self) -> Option<&str>
pub fn unity_version(&self) -> Option<&str>
Get Unity version
Sourcepub fn format_version(&self) -> Option<u32>
pub fn format_version(&self) -> Option<u32>
Get file format version
Sourcepub fn target_platform(&self) -> Option<i32>
pub fn target_platform(&self) -> Option<i32>
Get target platform
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AssetProcessor
impl !RefUnwindSafe for AssetProcessor
impl Send for AssetProcessor
impl Sync for AssetProcessor
impl Unpin for AssetProcessor
impl !UnwindSafe for AssetProcessor
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