pub struct ObjectInfo {
pub path_id: i64,
pub byte_start: u64,
pub byte_size: u32,
pub class_id: i32,
pub type_id: i32,
pub byte_order: ByteOrder,
pub data: Vec<u8>,
pub type_tree: Option<TypeTree>,
}Expand description
Information about a Unity object in a serialized file
Fields§
§path_id: i64Path ID (unique identifier within the file)
byte_start: u64Byte offset in the data section
byte_size: u32Size of the object data in bytes
class_id: i32Class ID of the object
type_id: i32Type ID (used for type lookup)
byte_order: ByteOrderByte order for reading this object
data: Vec<u8>Raw object data
type_tree: Option<TypeTree>Type information for this object
Implementations§
Source§impl ObjectInfo
impl ObjectInfo
Sourcepub fn new(path_id: i64, byte_start: u64, byte_size: u32, class_id: i32) -> Self
pub fn new(path_id: i64, byte_start: u64, byte_size: u32, class_id: i32) -> Self
Create a new ObjectInfo
Sourcepub fn reader(&self) -> BinaryReader<'_>
pub fn reader(&self) -> BinaryReader<'_>
Get a binary reader for this object’s data
Sourcepub fn class_name(&self) -> String
pub fn class_name(&self) -> String
Get the Unity class name for this object
Sourcepub fn parse_object(&self) -> Result<UnityClass>
pub fn parse_object(&self) -> Result<UnityClass>
Parse this object into a UnityClass using TypeTree information
Trait Implementations§
Source§impl Clone for ObjectInfo
impl Clone for ObjectInfo
Source§fn clone(&self) -> ObjectInfo
fn clone(&self) -> ObjectInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectInfo
impl RefUnwindSafe for ObjectInfo
impl Send for ObjectInfo
impl Sync for ObjectInfo
impl Unpin for ObjectInfo
impl UnwindSafe for ObjectInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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