Skip to content

Add world and world_mut methods to RelatedSpawner #18880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

urben1680
Copy link
Contributor

@urben1680 urben1680 commented Apr 19, 2025

Objective

RelatedSpawnerCommands offers methods to get the underlying Commands.
RelatedSpawner does not expose the inner World reference so far.

I currently want to write extension traits for both of them but I need to duplicate the whole API for the latter because I cannot get it's &mut World.

Solution

Add methods for immutable and mutable World access

@janhohenheim janhohenheim added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 19, 2025
@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 20, 2025
@mockersf
Copy link
Member

this makes it easier to do changes to the world unrelated to relations or to the target entity

@mockersf mockersf added the X-Contentious There are nontrivial implications that should be thought through label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants