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: content/learn/book/ecs/entities-components.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ status = 'hidden'
7
7
+++
8
8
9
9
**Entities** are the fundamental objects of your game world, whizzing around, storing cameras, being controlled by the player or tracking the state of a button.
10
-
On its own, the [`Entity`] type is a simple identifer: it has neither behavior nor data.
10
+
On its own, the [`Entity`] type is a simple identifier: it has neither behavior nor data.
11
11
Components store this data, and define the overlapping categories that the entity belongs to.
12
12
13
13
Informally, we use the term "entity" to refer to the conceptual entry in our [`World`]: all of the component data with the correct identifier, although it's very rare to use all of the data for a single entity at once.
In `bevy_ecs`, `ReflectMapEntities::map_entites` now requires an additional `entities` parameter to specify which entities it applies to.To keep the old behavior, use the new `ReflectMapEntities::map_all_entities`, but consider if passing the entities in specifically might be better for your use case to avoid bugs.
728
+
In `bevy_ecs`, `ReflectMapEntities::map_entities` now requires an additional `entities` parameter to specify which entities it applies to.To keep the old behavior, use the new `ReflectMapEntities::map_all_entities`, but consider if passing the entities in specifically might be better for your use case to avoid bugs.
729
729
730
730
### [Require `#[derive(Event)]` on all Events](https://github.com/bevyengine/bevy/pull/7086)
`mesh_functions::mesh_position_world_to_clip` was moved and renamed to `view_transformations::position_world_to_clip`. It now also takes a `vec3` instead of a `vec4` so you will need to use `vec4.xyz` to get a `vec3`.
If you relied on any of the panicing`From<Untyped...>` implementations, simply call the existing `typed` methods instead. Alternatively, use the new `TryFrom` implementation instead to directly expose possible mistakes.
65
+
If you relied on any of the panicking`From<Untyped...>` implementations, simply call the existing `typed` methods instead. Alternatively, use the new `TryFrom` implementation instead to directly expose possible mistakes.
66
66
67
67
### [Use `impl Into<A>` for `Assets::add`](https://github.com/bevyengine/bevy/pull/10878)
68
68
@@ -577,7 +577,7 @@ Calls to `fn map_entities(&mut self, entity_mapper: &mut EntityMapper)` need to
577
577
The `PipelinedRendering` plugin is no longer exported on wasm. If you are including it in your wasm builds you should remove it.
@@ -1386,7 +1386,7 @@ Callers of `Transform::up()` and similar functions may have to dereference the r
1386
1386
1387
1387
The clipped areas of UI nodes are no longer interactive.
1388
1388
1389
-
`RelativeCursorPostion` is now calculated relative to the whole node’s position and size, not only the visible part. Its `mouse_over` method only returns true when the cursor is over an unclipped part of the node.
1389
+
`RelativeCursorPosition` is now calculated relative to the whole node’s position and size, not only the visible part. Its `mouse_over` method only returns true when the cursor is over an unclipped part of the node.
1390
1390
1391
1391
`RelativeCursorPosition` no longer implements `Deref` and `DerefMut`.
1392
1392
@@ -1450,6 +1450,19 @@ Common examples of the updated variants are as follows:
1450
1450
1451
1451
See the relevant [documentation](https://docs.rs/bevy/0.13.0/bevy/input/keyboard/enum.KeyCode.html) for more information.
1452
1452
1453
+
#### ReceivedCharacter changes
1454
+
1455
+
The `char` field of [`ReceivedCharacter`] is now a [`SmolStr`], and _could_ contain multiple characters. See these [winit docs] for details.
1456
+
1457
+
A simple workaround if you need a `char` is to call `.chars().last()`.
1458
+
1459
+
It's now possible to use [`KeyEvent::logical_key`]'s `Character` variant instead if you need consistent cross-platform behavior and/or a unified event stream with non-character events.
`Window` has a new [`name`](https://docs.rs/bevy/latest/bevy/prelude/struct.Window.html#structfield.name) field for specifying the "window class name." If you don't need this, set it to `None`.
1490
1503
1491
-
### [ReceivedCharacter.char is now SmolStr instead of char]
### [Visibilty Inheritance, universal ComputedVisibility and RenderLayers support](https://github.com/bevyengine/bevy/pull/5310)
74
74
75
-
[`Visibility`] is now propagated into children in a similar way to `Transform`. Root elements of a hierarchy must now contain [`Visibility`] and [`ComputedVisiblity`] for visibility propagation to work.
75
+
[`Visibility`] is now propagated into children in a similar way to `Transform`. Root elements of a hierarchy must now contain [`Visibility`] and [`ComputedVisibility`] for visibility propagation to work.
76
76
77
77
[`SpatialBundle`] and [`VisibilityBundle`] have been added for convenience. If you were using a `TransformBundle` you should probably be using a [`SpatialBundle`] now.
78
78
79
-
If you were previously reading `Visibility::is_visible` as the "actual visibility" for sprites or lights, use `ComputedVisibilty::is_visible()` instead:
79
+
If you were previously reading `Visibility::is_visible` as the "actual visibility" for sprites or lights, use `ComputedVisibility::is_visible()` instead:
0 commit comments