[Merged by Bors] - Allow minimising in 2d#4527
[Merged by Bors] - Allow minimising in 2d#4527DJMcNab wants to merge 2 commits intobevyengine:mainfrom
Conversation
superdump
left a comment
There was a problem hiding this comment.
Hmm, I am wondering what view entity is passed in if there is no such entity matching the query.
|
I also wonder why this should panic instead of just returning an error. The Node::run are supposed to be fallible. |
|
the panic is This PR makes it returns a |
|
A similar change was made to |
|
can't reproduce the initial crash, but the code change makes sense |
|
Why is there no view when the window is minimised? |
|
Also, how come this only affects 2d? |
|
I don't know why this happens whilst minimised. Presumably we have some code that prevents creating swapchain textures of size 0. And as @devil-ira mentioned, #3330 added the same thing for 3d, hence that not crashing. |
|
I can do if someone makes a pr against the branch for it 😆 I'm not in a context where I can do any manual git operations at the moment |
|
I just made a pr against your branch. 👌 |
|
I guess we should add a UI camera to the minimising and resizing examples too |
|
soon ©️ (#4745) the ui camera will be a component on existing cameras |
Add a comment
|
bors r+ |
# Objective - We can't minimise if there's a 2d camera because ??? there legally must be a 2d target. - Fixes #4526 - Fixes #4856 ## Solution - Make it not crash in those cases, just do nothing - Seems to work ¯\\_(ツ)_/¯ - See also the companion commit in #3597 - 503c247 Co-authored-by: Asteria <asteria131@outlook.com>
# Objective - We can't minimise if there's a 2d camera because ??? there legally must be a 2d target. - Fixes bevyengine#4526 - Fixes bevyengine#4856 ## Solution - Make it not crash in those cases, just do nothing - Seems to work ¯\\_(ツ)_/¯ - See also the companion commit in bevyengine#3597 - 503c247 Co-authored-by: Asteria <asteria131@outlook.com>
# Objective - We can't minimise if there's a 2d camera because ??? there legally must be a 2d target. - Fixes bevyengine#4526 - Fixes bevyengine#4856 ## Solution - Make it not crash in those cases, just do nothing - Seems to work ¯\\_(ツ)_/¯ - See also the companion commit in bevyengine#3597 - 503c247 Co-authored-by: Asteria <asteria131@outlook.com>
Objective
Solution