Merge branch 'fix-sync' into 'main'

Fix resource sync

See merge request tipragot/bevnet!10
This commit is contained in:
Tipragot 2023-05-07 01:07:28 +02:00
commit 2bb65bf466

View file

@ -324,7 +324,7 @@ impl NetworkExt for App {
connection.send(&PhantomData::<R>);
}
};
self.add_system(update.run_if(resource_changed::<R>()))
self.add_system(update.run_if(resource_exists_and_changed::<R>()))
.add_system(send.run_if(resource_exists::<R>()))
.add_system(remove.run_if(resource_removed::<R>()))
}