-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add entities alongside resources #19711
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
Trashtalk217
wants to merge
35
commits into
bevyengine:main
Choose a base branch
from
Trashtalk217:resource_entity_lookup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
042337f
add back all changes
Trashtalk217 47c20a5
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 64eac9a
cargo fmt
Trashtalk217 956c1a6
cargo clippy
Trashtalk217 073df4b
add entities with resources, auto disabled IsResource
Trashtalk217 6c8281d
fixed and tests
Trashtalk217 f9dc9f1
fixed more tests
Trashtalk217 07723ac
fixed moore tests
Trashtalk217 1ba7af2
fix ci
Trashtalk217 b89c042
fix mooore tests (benches)
Trashtalk217 9b33933
fix docs
Trashtalk217 c7b4f1d
add migration guide
Trashtalk217 96aef45
fixed spelling errors to prove I'm not AI
Trashtalk217 e3ccd1b
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 5758134
addressed comments
Trashtalk217 9824c3a
testing robustness
Trashtalk217 9acf43f
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 da1d203
merge upstream
Trashtalk217 4d4e914
cleanup
Trashtalk217 78a0672
fix more stuff
Trashtalk217 4a2416d
update migration guides
Trashtalk217 3942c56
spelling
Trashtalk217 724a4c4
merge
Trashtalk217 f442ff6
fix imports
Trashtalk217 acb539e
second attempt at fixing a test
Trashtalk217 a0d76c3
merge
Trashtalk217 c99df9c
Merge branch 'resource_entity_lookup' of github.com:trashtalk217/bevy…
Trashtalk217 12383a3
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 d1b9b56
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 2261f8b
Merge branch 'main' of https://github.com/bevyengine/bevy into resour…
Trashtalk217 7f224be
address comments
Trashtalk217 6246539
Update crates/bevy_ecs/src/resource.rs
Trashtalk217 b83a617
Update crates/bevy_ecs/src/resource.rs
Trashtalk217 e98bcd8
Update crates/bevy_ecs/src/resource.rs
Trashtalk217 09e5ff8
Update crates/bevy_ecs/src/name.rs
Trashtalk217 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5056,6 +5056,7 @@ mod tests { | |
use crate::{ | ||
change_detection::{MaybeLocation, MutUntyped}, | ||
component::ComponentId, | ||
entity_disabling::Internal, | ||
prelude::*, | ||
system::{assert_is_system, RunSystemOnce as _}, | ||
world::{error::EntityComponentError, DeferredWorld, FilteredEntityMut, FilteredEntityRef}, | ||
|
@@ -5497,7 +5498,7 @@ mod tests { | |
|
||
world.spawn(TestComponent(0)).insert(TestComponent2(0)); | ||
|
||
let mut query = world.query::<EntityRefExcept<TestComponent>>(); | ||
let mut query = world.query::<EntityRefExcept<(TestComponent, Internal)>>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while it doesn't hurt, |
||
|
||
let mut found = false; | ||
for entity_ref in query.iter_mut(&mut world) { | ||
|
@@ -5555,7 +5556,10 @@ mod tests { | |
|
||
world.run_system_once(system).unwrap(); | ||
|
||
fn system(_: Query<&mut TestComponent>, query: Query<EntityRefExcept<TestComponent>>) { | ||
fn system( | ||
_: Query<&mut TestComponent>, | ||
query: Query<EntityRefExcept<(TestComponent, Internal)>>, | ||
) { | ||
for entity_ref in query.iter() { | ||
assert!(matches!( | ||
entity_ref.get::<TestComponent2>(), | ||
|
@@ -5572,7 +5576,7 @@ mod tests { | |
let mut world = World::new(); | ||
world.spawn(TestComponent(0)).insert(TestComponent2(0)); | ||
|
||
let mut query = world.query::<EntityMutExcept<TestComponent>>(); | ||
let mut query = world.query::<EntityMutExcept<(TestComponent, Internal)>>(); | ||
|
||
let mut found = false; | ||
for mut entity_mut in query.iter_mut(&mut world) { | ||
|
@@ -5637,7 +5641,10 @@ mod tests { | |
|
||
world.run_system_once(system).unwrap(); | ||
|
||
fn system(_: Query<&mut TestComponent>, mut query: Query<EntityMutExcept<TestComponent>>) { | ||
fn system( | ||
_: Query<&mut TestComponent>, | ||
mut query: Query<EntityMutExcept<(TestComponent, Internal)>>, | ||
) { | ||
for mut entity_mut in query.iter_mut() { | ||
assert!(entity_mut | ||
.get_mut::<TestComponent2>() | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.