-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Make Visibility affect children entities #3874
Copy link
Copy link
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleA new feature, making something new possible
Description
What problem does this solve?
It's useful to "bulk" toggle the visibility of a group of entities.
What problems does it introduce?
User may want to toggle visibility of parent without affecting the visibility of the children. Typically, you might want some parent to become invisible while the children are still visible in cases where you also take advantage of parent/child relationship for Transform/GlobalTransform.
What solution would you like?
- My best guess would be a
ActualVisibilitynon-public component that is given to all children ofChanged<Visibility>entities. This would also require updating the component on hierarchy changes. - To be able to decouple transform hierarchy from visibility hierarchy, it would be advisable to add a
Inheritancecomponent or as an additional field toParentandChildrenthat let the user select which property is inherited (as suggested by @alice-i-cecile ) Note: this might be worth it's own separate PR
What alternative(s) have you considered?
- It might be possible to walk the hierarchy at render time to infer then whether to display or not the concerned entity.
- Relations 🌈
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleA new feature, making something new possible