Skip to content
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

Warn when no camera exists to render an object #1432

Open
alice-i-cecile opened this issue Feb 11, 2021 · 7 comments
Open

Warn when no camera exists to render an object #1432

alice-i-cecile opened this issue Feb 11, 2021 · 7 comments
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help!

Comments

@alice-i-cecile
Copy link
Member

What problem does this solve or what need does it fill?

Beginners commonly attempt to get started with adding 2D/3D/UI graphics, forget to add a camera, and then are confused when nothing appears.

What solution would you like?

Warn when no camera of the appropriate type exists.

What alternative(s) have you considered?

Improve documentation further, especially in the Bevy book.

Additional context

The exact timing / details of when this should trigger need some work by others who understand the rendering pipeline more clearly.

We should also be careful not to create unsilenceable warnings in cases where the lack of camera may actually be intended.

@cart
Copy link
Member

cart commented Feb 13, 2021

From a comment I left in #1440:

I think my ideal solution is to make the UiCamera completely optional (and fall back to a default value). Most people don't need control over the UI camera, so theres no real reason to dictate one (other than the fact that its easier to require one because that behavior is consistent with the other render passes)

@cart
Copy link
Member

cart commented Feb 13, 2021

The same argument could be made for 2D render passes. But 3d has no "reasonable default", so it might make sense to warn if you try to draw a 3d object when there is no camera.

@alice-i-cecile alice-i-cecile added S-Needs-Triage This issue needs to be labelled D-Trivial Nice and easy! A great choice to get started with Bevy C-Usability A simple quality-of-life change that makes Bevy easier to use and removed S-Needs-Triage This issue needs to be labelled labels Feb 16, 2021
FlexW pushed a commit to FlexW/bevy that referenced this issue Dec 18, 2022
Show a warning if meshes get rendererd without a camera.

Fix: bevyengine#1432
FlexW pushed a commit to FlexW/bevy that referenced this issue Dec 18, 2022
Show a warning if meshes get rendered without a camera.

Fix: bevyengine#1432
@wduminy
Copy link

wduminy commented Nov 26, 2023

I am here because this issue is marked as a good first issue.

However, related items indicate that this issue is possibly resolved.

Is there any more work to be done here?

@Nilirad Nilirad added the A-Rendering Drawing game state to the screen label Dec 1, 2023
@richchurcher
Copy link
Contributor

Hrm 🤔 The associated PR was closed because it added a check on each frame. The goal is to achieve a warning without using a system. I'll take a poke around, see what the current state is, and whether there might be a semi-obvious solution in 2024.

@alice-i-cecile alice-i-cecile added D-Complex Quite challenging from either a design or technical perspective. Ask for help! and removed D-Trivial Nice and easy! A great choice to get started with Bevy labels Jul 31, 2024
@richchurcher
Copy link
Contributor

Well now you've added D-Complex 🙀 😆

I see UI is already warning about this via a system:
image
I'll see if there's anything else to be uncovered that doesn't mess with rendering too badly.

@alice-i-cecile
Copy link
Member Author

If it's taken 3 years and multiple attempts to fix I am forced to revise my estimation of difficulty upwards ;)

@richchurcher
Copy link
Contributor

Yeah, I'm gonna call defeat on this one until I am more of an "expert" (or less of an ignoramus!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants