Skip to content
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

[Merged by Bors] - Implement FromWorld for WorldId #7726

Closed
wants to merge 3 commits into from

Conversation

JoJoJet
Copy link
Member

@JoJoJet JoJoJet commented Feb 17, 2023

Objective

Allow using Local<WorldId> in systems.

Solution

  • Describe the solution used to achieve the objective above.

Changelog

  • WorldId now implements the FromWorld trait.

@JoJoJet JoJoJet added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 17, 2023
@alice-i-cecile
Copy link
Member

Very nice docs, thank you.

Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I don't think this is a bad idea, the justification of using Local<WorldId> has me set off a bit (akin to how Query<Option<With<T>>> does). Could we not make WorldId a SystemParam?

@JoJoJet
Copy link
Member Author

JoJoJet commented Feb 17, 2023

We can do that too

@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 18, 2023
@alice-i-cecile
Copy link
Member

@JoJoJet once you've rebased I'll merge this.

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 20, 2023
# Objective

Allow using `Local<WorldId>` in systems.

## Solution

- Describe the solution used to achieve the objective above.

---

## Changelog

+ `WorldId` now implements the `FromWorld` trait.
@bors bors bot changed the title Implement FromWorld for WorldId [Merged by Bors] - Implement FromWorld for WorldId Feb 20, 2023
@bors bors bot closed this Feb 20, 2023
@JoJoJet JoJoJet deleted the from-world-id branch February 21, 2023 15:48
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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants