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 with_info(type_name: String, name: String, byte_size: i32) -> Self
pub fn with_info(type_name: String, name: String, byte_size: i32) -> Self
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 more