Replies: 2 comments
-
There is a third option that might fit better for this use case: setting the style's |
Beta Was this translation helpful? Give feedback.
0 replies
-
We definitely want Visibility to "cascade down" hierarchy in Bevy (even for non ui things). This will be very important when nested scenes become a thing. Developers should be able to hide a "player scene" by hiding the scene's root entity. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the current bevy ui crate. Would it make sense for the
Visibility
component to not only affect the entity it is bound to, but also all the children of that entity?Typically, you want to hide/show complete menus when navigating between them, while having all accessible ones at least loaded. Currently, there are two ways to do that:
Res
) the list of all entities in a given menu, and mutate en masse theVisibility.is_visible
for each entity in itHaving the
Visibility
component inheritable would make it only the encompassing menu node would need to be modified.I guess I convinced myself option (1) is already more than enough. Ideally this could be combined with culling ui elements outside of the camera view, and there would be no reason to not do it.
Maybe other people may disagree with my conclusion. Any thought?
Beta Was this translation helpful? Give feedback.
All reactions