Return missing component types in QueryDoesNotMatch
errors
#8917
Labels
A-Diagnostics
Logging, crash handling, error reporting and performance analysis
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
When handling
QueryEntityError::QueryDoesNotMatch
fromQuery
s over multiple component types, it'd be useful for debugging to be able to check which components were missing.What solution would you like?
The first that comes to mind is to just put a Vec of component names in the error type, but it doesn't have to be that -- I just want to be able to find out without having to manually check each component. Maybe a
Query::get_missing
function?What alternative(s) have you considered?
Query<(X, Y)>
, useQuery<(Option<X>, Option<Y>)>
-- this isn't very ergonomic, though, especially when the component isn't actually intended to be optional.Related PRs
The text was updated successfully, but these errors were encountered: