@@ -5,12 +5,19 @@ A runtime warning.
5
5
An [ ` Entity ` ] with a hierarchy-inherited component has a [ ` Parent ` ]
6
6
without the hierarchy-inherited component in question.
7
7
8
- The hierarchy-inherited components are :
8
+ The hierarchy-inherited components defined in bevy include :
9
9
10
10
- [ ` ComputedVisibility ` ]
11
11
- [ ` GlobalTransform ` ]
12
12
13
- For example, the following code will cause a warning to be emitted:
13
+ Third party plugins may also define their own hierarchy components, so
14
+ read carefully the warning message and pay attention to the exact type
15
+ of the missing component.
16
+
17
+ To fix this warning, add the missing hierarchy component to all ancestors
18
+ of entities with the hierarchy component you wish to use.
19
+
20
+ The following code will cause a warning to be emitted:
14
21
15
22
``` rust,no_run
16
23
use bevy::prelude::*;
@@ -55,7 +62,7 @@ Since the cube is spawned as a child of an entity without the
55
62
[ ` ComputedVisibility ` ] component, it will not be visible at all.
56
63
57
64
To fix this, you must use [ ` SpatialBundle ` ] over [ ` TransformBundle ` ] ,
58
- as follow :
65
+ as follows :
59
66
60
67
``` rust,no_run
61
68
use bevy::prelude::*;
@@ -100,7 +107,7 @@ However, when a parent [`GlobalTransform`] is missing,
100
107
it will simply prevent all transform propagation,
101
108
including when updating the [ ` Transform ` ] component of the child.
102
109
103
- You will most likely encouter this warning when loading a scene
110
+ You will most likely encounter this warning when loading a scene
104
111
as a child of a pre-existing [ ` Entity ` ] that does not have the proper components.
105
112
106
113
[ `ComputedVisibility` ] : https://docs.rs/bevy/*/bevy/render/view/struct.ComputedVisibility.html
0 commit comments