mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
fixed node handle mapping for hash maps
This commit is contained in:
@@ -254,6 +254,21 @@ where
|
||||
return;
|
||||
}
|
||||
|
||||
entity.as_hash_map_mut(&mut |hash_map| {
|
||||
if let Some(hash_map) = hash_map {
|
||||
for i in 0..hash_map.reflect_len() {
|
||||
if let Some(item) = hash_map.reflect_get_nth_value_mut(i) {
|
||||
self.remap_handles_internal(item, node_name, ignored_types);
|
||||
}
|
||||
}
|
||||
mapped = true;
|
||||
}
|
||||
});
|
||||
|
||||
if mapped {
|
||||
return;
|
||||
}
|
||||
|
||||
// Continue remapping recursively for every compound field.
|
||||
entity.fields_mut(&mut |fields| {
|
||||
for field in fields {
|
||||
@@ -366,6 +381,28 @@ where
|
||||
return;
|
||||
}
|
||||
|
||||
entity.as_hash_map_mut(&mut |result| {
|
||||
if let Some(hash_map) = result {
|
||||
for i in 0..hash_map.reflect_len() {
|
||||
if let Some(item) = hash_map.reflect_get_nth_value_mut(i) {
|
||||
self.remap_inheritable_handles_internal(
|
||||
item,
|
||||
node_name,
|
||||
// Propagate mapping flag - it means that we're inside inheritable variable. In this
|
||||
// case we will map handles.
|
||||
do_map,
|
||||
ignored_types,
|
||||
);
|
||||
}
|
||||
}
|
||||
mapped = true;
|
||||
}
|
||||
});
|
||||
|
||||
if mapped {
|
||||
return;
|
||||
}
|
||||
|
||||
// Continue remapping recursively for every compound field.
|
||||
entity.fields_mut(&mut |fields| {
|
||||
for field in fields {
|
||||
|
||||
Reference in New Issue
Block a user