diff --git a/fyrox-graph/src/lib.rs b/fyrox-graph/src/lib.rs index d6e19dea3..6df13c87e 100644 --- a/fyrox-graph/src/lib.rs +++ b/fyrox-graph/src/lib.rs @@ -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 {