pub struct SerializedType {
pub class_id: i32,
pub is_stripped_type: bool,
pub script_type_index: i16,
pub type_tree: TypeTree,
pub script_id: [u8; 16],
pub old_type_hash: [u8; 16],
pub type_dependencies: Vec<i32>,
pub class_name: String,
pub namespace: String,
pub assembly_name: String,
}Expand description
Type information for Unity objects
Contains metadata about Unity object types including class information, type trees, and script references.
Fields§
§class_id: i32Unity class ID
is_stripped_type: boolWhether this type is stripped
script_type_index: i16Script type index (for MonoBehaviour / ref types); -1 means not a script type.
type_tree: TypeTreeType tree for this type
script_id: [u8; 16]Script ID hash
old_type_hash: [u8; 16]Old type hash
type_dependencies: Vec<i32>Type dependencies
class_name: StringClass name
namespace: StringNamespace
assembly_name: StringAssembly name
Implementations§
Source§impl SerializedType
impl SerializedType
Sourcepub fn new(class_id: i32) -> SerializedType
pub fn new(class_id: i32) -> SerializedType
Create a new SerializedType
Sourcepub fn from_reader(
reader: &mut BinaryReader<'_>,
version: u32,
enable_type_tree: bool,
is_ref_type: bool,
) -> Result<SerializedType, BinaryError>
pub fn from_reader( reader: &mut BinaryReader<'_>, version: u32, enable_type_tree: bool, is_ref_type: bool, ) -> Result<SerializedType, BinaryError>
Parse SerializedType from binary data
Sourcepub fn is_script_type(&self) -> bool
pub fn is_script_type(&self) -> bool
Check if this is a script type (MonoBehaviour)
Sourcepub fn has_type_tree(&self) -> bool
pub fn has_type_tree(&self) -> bool
Check if this type has a TypeTree
Sourcepub fn full_type_name(&self) -> String
pub fn full_type_name(&self) -> String
Get full type name including namespace
Sourcepub fn validate(&self) -> Result<(), BinaryError>
pub fn validate(&self) -> Result<(), BinaryError>
Validate the serialized type
Trait Implementations§
Source§impl Clone for SerializedType
impl Clone for SerializedType
Source§fn clone(&self) -> SerializedType
fn clone(&self) -> SerializedType
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 moreSource§impl Debug for SerializedType
impl Debug for SerializedType
Source§impl<'de> Deserialize<'de> for SerializedType
impl<'de> Deserialize<'de> for SerializedType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SerializedType
impl Serialize for SerializedType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SerializedType
impl RefUnwindSafe for SerializedType
impl Send for SerializedType
impl Sync for SerializedType
impl Unpin for SerializedType
impl UnwindSafe for SerializedType
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