Setting a `TargetCamera` on a non-UI entity, or `RenderLayers` on a UI entity should be an error
Open
A-Rendering
A-UI
C-Feature
C-Usability
D-Straightforward
S-Ready-For-Implementation
X-Uncontroversial
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
It's easy for users to assume that `TargetCamera` or `RenderLayers` work with all entities. The only reason this hasn't come up much is because there aren't many Bevy apps using multiple windows.
## What solution would you like?
Panic if a UI entity has a `RenderLayers` component or a non-UI entity has a `TargetCamera` component.
## What alternative(s) have you considered?
We could remove `TargetCamera` and make the UI respect `RenderLayers` but that would cause a lot of problems with layout, text and scale factors that would need to be resolved so it isn't really feasible at the moment.
Contributor guide
Assessment
This issue has not been assessed yet.