Skip to content

[Merged by Bors] - Add more FromWorld implementations#3945

Closed
TheRawMeatball wants to merge 5 commits intobevyengine:mainfrom
TheRawMeatball:more-useful-fromworld
Closed

[Merged by Bors] - Add more FromWorld implementations#3945
TheRawMeatball wants to merge 5 commits intobevyengine:mainfrom
TheRawMeatball:more-useful-fromworld

Conversation

@TheRawMeatball
Copy link
Member

Objective

Make FromWorld more useful for abstractions with a form similar to

trait FancyAbstraction {
  type PreInitializedData: FromWorld;
}

Solution

Add a FromWorld implementation for SystemState as well as a way to group together multiple FromWorld implementing types as one.

Note: I plan to follow up this PR with another to add Local support to exclusive systems, which should get a fair amount of use from the FromWorld implementation on SystemState.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Feb 14, 2022
@TheRawMeatball TheRawMeatball added A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible and removed S-Needs-Triage This issue needs to be labelled labels Feb 14, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Very interesting. This PR's code quality and docs are fine. The future work sounds promising and this LGTM, but I wouldn't merge until we have something useful built on top of this (just fork off of this PR IMO).

Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

This is a win! Love the idea. Maybe we should do the same for QueryState?

@alice-i-cecile
Copy link
Member

This is a win! Love the idea. Maybe we should do the same for QueryState?

I like this, I think.

@cart
Copy link
Member

cart commented Apr 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Apr 5, 2022
# Objective

Make `FromWorld` more useful for abstractions with a form similar to
```rs
trait FancyAbstraction {
  type PreInitializedData: FromWorld;
}
```

## Solution

Add a `FromWorld` implementation for `SystemState` as well as a way to group together multiple `FromWorld` implementing types as one.

Note: I plan to follow up this PR with another to add `Local` support to exclusive systems, which should get a fair amount of use from the `FromWorld` implementation on `SystemState`.
@bors bors bot changed the title Add more FromWorld implementations [Merged by Bors] - Add more FromWorld implementations Apr 5, 2022
@bors bors bot closed this Apr 5, 2022
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

Make `FromWorld` more useful for abstractions with a form similar to
```rs
trait FancyAbstraction {
  type PreInitializedData: FromWorld;
}
```

## Solution

Add a `FromWorld` implementation for `SystemState` as well as a way to group together multiple `FromWorld` implementing types as one.

Note: I plan to follow up this PR with another to add `Local` support to exclusive systems, which should get a fair amount of use from the `FromWorld` implementation on `SystemState`.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Make `FromWorld` more useful for abstractions with a form similar to
```rs
trait FancyAbstraction {
  type PreInitializedData: FromWorld;
}
```

## Solution

Add a `FromWorld` implementation for `SystemState` as well as a way to group together multiple `FromWorld` implementing types as one.

Note: I plan to follow up this PR with another to add `Local` support to exclusive systems, which should get a fair amount of use from the `FromWorld` implementation on `SystemState`.
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-Feature A new feature, making something new possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants