Return types for `ecs_find!` queries
recatek opened this issue · comments
For ecs_find!
and ecs_find_borrow!
queries, we could support having the query macro parse a return type and return it (while also bundling it with the bool for whether or not the entity was found):
let (found, result) = ecs_find!(world, entity, |a: &CompA| -> u64 { /* ... */ })
Where found
is a bool
and result
is the u64
we requested to return.
Done in 0.3.0