Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
EntityCommands::trigger
to check for the entity's existence (#…
…18071) ## Objective `EntityCommands::trigger` internally uses `Commands::trigger_targets`, which means it gets queued using `Commands::queue` rather `EntityCommands::queue`. This previously wouldn't have made much difference, but now entity commands check whether the entity exists, and that check never happens in this case. ## Solution - Add `entity_command::trigger`, which calls the same function as before (`World::trigger_targets_with_caller`) but through the `EntityWorldMut` passed to entity commands. - Change `EntityCommands::trigger` to queue the new entity command normally.
- Loading branch information