-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Error on unloaded ImageRenderTarget #20503
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
Conversation
76654cd
to
409b13d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to return a Result rather than an Option here TBH. Programatically handling error cases is much nicer than just sprinkling in logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer! Needs a migration guide though <3
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
36668da
to
5ac3c6a
Compare
Objective
When using
RenderTarget::Image
with an image set to use in the render world only, thecamera_system
is unable to get its render target info and fails silently, breaking things down the line. From what I saw the view uniforms stopped updating, but there might be other things it broke as well.Solution
At least make it fail loudly :)
Not sure if it should panic here, or return a better error enum that the caller can decide what to do with. Should all failures to update the render target info be hard errors?
Testing
Error gets printed when running the project I found the bug with