pub struct TypeTreeNode {
pub type_name: String,
pub name: String,
pub byte_size: i32,
pub index: i32,
pub type_flags: i32,
pub version: i32,
pub meta_flags: i32,
pub level: i32,
pub type_str_offset: u32,
pub name_str_offset: u32,
pub ref_type_hash: u64,
pub children: Vec<TypeTreeNode>,
}Expand description
A node in the Unity TypeTree
Each node represents a field or type in the Unity object structure, forming a tree that describes the complete object layout.
Fields§
§type_name: StringType name (e.g., “int”, “string”, “GameObject”)
name: StringField name (e.g., “m_Name”, “m_IsActive”)
byte_size: i32Size in bytes (-1 for variable size)
index: i32Index in the type tree
type_flags: i32Type flags
version: i32Version of this type
meta_flags: i32Meta flags (alignment, etc.)
level: i32Depth level in the tree
type_str_offset: u32Offset in type string buffer
name_str_offset: u32Offset in name string buffer
ref_type_hash: u64Reference type hash
children: Vec<TypeTreeNode>Child nodes
Implementations§
Source§impl TypeTreeNode
impl TypeTreeNode
Sourcepub fn new() -> TypeTreeNode
pub fn new() -> TypeTreeNode
Create a new TypeTree node
Sourcepub fn with_info(
type_name: String,
name: String,
byte_size: i32,
) -> TypeTreeNode
pub fn with_info( type_name: String, name: String, byte_size: i32, ) -> TypeTreeNode
Create a new node with basic information
Sourcepub fn is_aligned(&self) -> bool
pub fn is_aligned(&self) -> bool
Check if this node is aligned
Sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Check if this is a primitive type
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Check if this is a numeric type
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Check if this is a boolean type
Sourcepub fn find_child(&self, name: &str) -> Option<&TypeTreeNode>
pub fn find_child(&self, name: &str) -> Option<&TypeTreeNode>
Find a child node by name
Sourcepub fn find_child_mut(&mut self, name: &str) -> Option<&mut TypeTreeNode>
pub fn find_child_mut(&mut self, name: &str) -> Option<&mut TypeTreeNode>
Find a child node by name (mutable)
Sourcepub fn child_names(&self) -> Vec<&str>
pub fn child_names(&self) -> Vec<&str>
Get all child names
Sourcepub fn add_child(&mut self, child: TypeTreeNode)
pub fn add_child(&mut self, child: TypeTreeNode)
Add a child node
Sourcepub fn remove_child(&mut self, name: &str) -> Option<TypeTreeNode>
pub fn remove_child(&mut self, name: &str) -> Option<TypeTreeNode>
Remove a child node by name
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Check if this node has children
Sourcepub fn child_count(&self) -> usize
pub fn child_count(&self) -> usize
Get the number of children
Trait Implementations§
Source§impl Clone for TypeTreeNode
impl Clone for TypeTreeNode
Source§fn clone(&self) -> TypeTreeNode
fn clone(&self) -> TypeTreeNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypeTreeNode
impl Debug for TypeTreeNode
Source§impl Default for TypeTreeNode
impl Default for TypeTreeNode
Source§fn default() -> TypeTreeNode
fn default() -> TypeTreeNode
Source§impl<'de> Deserialize<'de> for TypeTreeNode
impl<'de> Deserialize<'de> for TypeTreeNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeTreeNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeTreeNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TypeTreeNode
impl Serialize for TypeTreeNode
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,
Auto Trait Implementations§
impl Freeze for TypeTreeNode
impl RefUnwindSafe for TypeTreeNode
impl Send for TypeTreeNode
impl Sync for TypeTreeNode
impl Unpin for TypeTreeNode
impl UnwindSafe for TypeTreeNode
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
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>
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>
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>
ReadEndian::read_from_little_endian().