-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add marker components for different camera types #1854
Comments
As part of the PR to fix this issue, it might be nice to demonstrate how to use it in a small example (or as part of one of the games). Combine it with |
While we're fixing this, we should probably just rework how Bevy's internal systems manage cameras as well. It's probably worth removing the name field entirely, to avoid exposing / using an inferior API. Now that sparse set storage exists, there's no reason not to use marker components for all of the "name X" use cases. |
This resulted in a confusing problem for a user trying to make their own camera variant. |
#3412 will significantly impact how this is handled and add complexity, so this should wait until after it's merged. |
Is this still relevant after #4745? |
What problem does this solve or what need does it fill?
Selecting particular camera types is frustrating, relying on checking the name field within a system.
What solution would you like?
Add a simple marker components for
UiCamera
andGameplayCamera
.Various rendering systems should use this mechanism, instead of the camera's name.
What alternative(s) have you considered?
Users can add their own marker components manually.
Only tag
UiCamera
and useWithout<UiCamera>
.Add a unique marker component for each of
2dCamera
,3dCamera
and so on. This is less clear, and it seems extremely rare that you will have more than one different type of gameplay camera at once.Additional context
Example of this problem in #help
The text was updated successfully, but these errors were encountered: