You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following standalone testcase, after the second iteration when Added counting becomes 0, I think we should also see both boolean be false.
The second boolean, being based QueryOne.get() has been reported by @cart to behave incorrectly in #488.
But I suspect the first one, based onQuery.get() should also return false ?
use bevy::prelude::*;fnmain(){App::build().add_default_plugins().add_startup_system(startup_system.system()).add_system(normal_system.system()).run();}structComp{}/// Startup systems are run exactly once when the app starts up./// They run right before "normal" systems run.fnstartup_system(mutcommands:Commands){
commands.spawn((Comp{},));let entity = commands.current_entity().unwrap();
commands.insert_resource(entity);}fnnormal_system(entity:Res<Entity>,mutquery:Query<(&Comp,)>,mutquery_added:Query<(Added<Comp>,)>,){letmut n_comp = 0;letmut n_added = 0;for(_comp,)in&mut query.iter(){
n_comp += 1;}for(_comp,)in&mut query_added.iter(){
n_added += 1;}let found1 = query_added.get::<Comp>(*entity).is_some();letmut one = query_added.entity(*entity).unwrap();let found2 = one.get().is_some();println!("Count: {}, Added: {}, query.get {} query.entity.get {}",
n_comp, n_added, found1, found2
);}
The text was updated successfully, but these errors were encountered:
With the following standalone testcase, after the second iteration when Added counting becomes 0, I think we should also see both boolean be false.
The second boolean, being based QueryOne.get() has been reported by @cart to behave incorrectly in #488.
But I suspect the first one, based onQuery.get() should also return false ?
The text was updated successfully, but these errors were encountered: