Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an opaque type for
EntityCommand::with_entity
(bevyengine#11210)
# Objective The trait method `with_entity` is used to add an `EntityCommand` to the command queue. Currently this method returns `WithEntity<C>` which pairs a command with an `Entity`. By replacing this explicit type with an opaque type, implementors can override this default implementation by returning a custom command or closure that does the same thing with a lower memory footprint. # Solution Return an opaque type from the method. As a bonus this file is now cleaner without the `WithEntity` boilerplate
- Loading branch information