Closed TsujimotoYukasuke closed 1 year ago
Commands are not immediately applied after a system ends, but instead they are applied only at certain synchronization points. There is a default synchronization point between the two sets, but using after
/before
/chain
doesn't create one. Instead you have to manually insert a apply_system_buffers
system in between the two.
I see, I remember reading that somewhere. This works as intended then, sorry for the false bug report.
System Information
stable-x86_64-pc-windows-msvc
(tested reproducible example on this version)nightly-x86_64-pc-windows-msvc
(encountered issue on this version)Issue
Was attempting to insert a resource into my ecs using one system which would then be used by another. I used the
.before
and.after
system ordering in order to do this. I remember being able to do so using simple system names.Here's a reproducible example:
What I expected to happen
The system to print 5
What actually happened
Rust panic. Error:
thread 'TaskPool (10)' panicked at 'Resource requested by bug_test::system_b does not exist: bug_test::AResource', C:\Users\tsuji\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_ecs-0.10.1\src\system\system_param.rs:460:17
Additional information
This works properly if I use system sets rather than using
.before
or.after
.I'm wondering if I am just using this incorrectly, and if so I apologize for the false report.