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

Show warning when no camera is used #6978

Closed
wants to merge 1 commit into from

Conversation

FlexW
Copy link

@FlexW FlexW commented Dec 18, 2022

Objective

Show a warning if meshes get rendered without a camera.

Fixes #1432

Solution

Add a system to the extract render stage that queries for all cameras and all meshes. If only meshes and no camera was found, a warning gets emitted.

What I don't like about this solution, is that the console gets spammed by the warning. Please let me know what you think.


Changelog

Print a warning when trying to render meshes without a camera.

Show a warning if meshes get rendered without a camera.

Fix: bevyengine#1432
@alice-i-cecile
Copy link
Member

Hmm yeah I don't love that this is spinning and constantly checking and warning. Is there an initialization step where we could check this?

@mockersf
Copy link
Member

Not a fan of adding a system just for that, and I'm not convinced there isn't a use case for having meshes without a camera

@mockersf mockersf added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Dec 18, 2022
@FlexW
Copy link
Author

FlexW commented Dec 19, 2022

@alice-i-cecile I will take a look and see if I can find something.
@mockersf Ok, that might be true. If others agree, then it might make sense to close the open issue.

@alice-i-cecile
Copy link
Member

Yep, if you can't find a good way to do this without a system we should just close the issue.

@cart
Copy link
Member

cart commented Dec 21, 2022

I agree that there might be use cases for having meshes without cameras, and I'm also not a fan of a system spinning to do this check each frame.

Feel free to open a new PR if you find something that works around these issues!

@cart cart closed this Dec 21, 2022
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 targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn when no camera exists to render an object
4 participants