bevy_ecs: forward type_id
in InfallibleSystemWrapper
(#18931)
similar to https://github.com/bevyengine/bevy/pull/12030 # Objective `bevy_mod_debugdump` uses the `SystemTypeSet::system_type` to look up constrains like `(system_1, system_2.after(system_1))`. For that it needs to find the type id in `schedule.graph().systems()` Now with systems being wrapped in an `InfallibleSystemWrapper` this association was no longer possible. ## Solution By forwarding the type id in `InfallibleSystemWrapper`, `bevy_mod_debugdump` can resolve the dependencies as before, and the wrapper is an unnoticable implementation detail. ## Testing - `cargo test -p bevy_ecs` I'm not sure what exactly could break otherwise.
This commit is contained in:
parent
ddc3264794
commit
489dca774c
@ -30,6 +30,10 @@ impl<S: System<In = ()>> System for InfallibleSystemWrapper<S> {
|
|||||||
self.0.name()
|
self.0.name()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn type_id(&self) -> core::any::TypeId {
|
||||||
|
self.0.type_id()
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn component_access(&self) -> &Access<ComponentId> {
|
fn component_access(&self) -> &Access<ComponentId> {
|
||||||
self.0.component_access()
|
self.0.component_access()
|
||||||
|
Loading…
Reference in New Issue
Block a user