Add script reference handling in RojoTree during snapshot insertion

- Implemented logic to insert script references into the tree when a snapshot of a script class is processed.
- Enhanced the existing snapshot insertion method to ensure proper tracking of script instances.

These changes aim to improve the management of script references within the RojoTree structure.
This commit is contained in:
Joe 2026-02-28 12:30:17 -06:00
parent 22e437a055
commit 288e679653

View file

@ -69,6 +69,10 @@ impl RojoTree {
tree.insert_metadata(root_ref, snapshot.metadata); tree.insert_metadata(root_ref, snapshot.metadata);
if is_script_class(snapshot.class_name.as_ref()) {
tree.script_refs.insert(root_ref);
}
for child in snapshot.children { for child in snapshot.children {
tree.insert_instance(root_ref, child); tree.insert_instance(root_ref, child);
} }