You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/bevy_ecs/src/reflect/map_entities.rs
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,11 @@ impl ReflectMapEntities {
24
24
///
25
25
/// Be mindful in its usage: Works best in situations where the entities in the [`EntityHashMap<Entity>`] are newly
26
26
/// created, before systems have a chance to add new components. If some of the entities referred to
27
-
/// by the [`EntityHashMap<Entity>`] might already contain valid entity references, you should use [`map_entities`](Self::map_entities).
27
+
/// by the [`EntityHashMap<Entity>`] might already contain valid entity references, you should use
28
+
/// [`map_world_entities`](Self::map_entities).
28
29
///
29
30
/// An example of this: A scene can be loaded with `Parent` components, but then a `Parent` component can be added
30
-
/// to these entities after they have been loaded. If you reload the scene using [`map_all_entities`](Self::map_all_entities), those `Parent`
31
+
/// to these entities after they have been loaded. If you reload the scene using [`map_all_world_entities`](Self::map_all_world_entities), those `Parent`
31
32
/// components with already valid entity references could be updated to point at something else entirely.
32
33
pubfnmap_all_world_entities(
33
34
&self,
@@ -38,11 +39,11 @@ impl ReflectMapEntities {
38
39
}
39
40
40
41
/// A general method for applying [`MapEntities`] behavior to elements in an [`EntityHashMap<Entity>`]. Unlike
41
-
/// [`map_all_entities`](Self::map_all_entities), this is applied to specific entities, not all values
42
+
/// [`map_all_world_entities`](Self::map_all_world_entities), this is applied to specific entities, not all values
42
43
/// in the [`EntityHashMap<Entity>`].
43
44
///
44
45
/// This is useful mostly for when you need to be careful not to update components that already contain valid entity
45
-
/// values. See [`map_all_entities`](Self::map_all_entities) for more details.
46
+
/// values. See [`map_all_world_entities`](Self::map_all_world_entities) for more details.
46
47
pubfnmap_world_entities(
47
48
&self,
48
49
world:&mutWorld,
@@ -54,10 +55,14 @@ impl ReflectMapEntities {
54
55
});
55
56
}
56
57
58
+
/// A general method for applying an operation to all entities in a
0 commit comments