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 new() -> AssetProcessor
pub fn new() -> AssetProcessor
Create a new asset processor
Sourcepub fn parse_from_bytes(&mut self, data: Vec<u8>) -> Result<(), BinaryError>
pub fn parse_from_bytes(&mut self, data: Vec<u8>) -> Result<(), BinaryError>
Parse SerializedFile from binary data
Sourcepub fn parse_from_file<P>(&mut self, path: P) -> Result<(), BinaryError>
pub fn parse_from_file<P>(&mut self, path: P) -> Result<(), BinaryError>
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 validate(&self) -> Result<(), BinaryError>
pub fn validate(&self) -> Result<(), BinaryError>
Validate the loaded file
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§
Source§impl Default for AssetProcessor
impl Default for AssetProcessor
Source§fn default() -> AssetProcessor
fn default() -> AssetProcessor
Returns the “default value” for a type. Read more
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
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().