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
I have the above implementation of a trait where users should be allowed to define their own trigger parameters. However, Self::hydrate cannot become an ObserverSystem, with error message
1. `fn(On<'a, 'b, Add, Self>, ...) {<... as EntityBlueprint>::hydrate}` cannot become an `ObserverSystem`
the trait `bevy::prelude::IntoSystem<bevy::prelude::On<'static, 'static, _, _>, (), _>` is not implemented for fn item `fn(On<'a, 'b, Add, Self>, ...) {<... as EntityBlueprint>::hydrate}`
for function `ObserverSystem`s, ensure the first argument is `On<T>` and any subsequent ones are `SystemParam`
the following other types implement trait `bevy::prelude::IntoSystem<In, Out, Marker>`:
`IntoAdapterSystem<Func, S>` implements `bevy::prelude::IntoSystem<<Func as Adapt<<S as bevy::prelude::IntoSystem<I, O, M>>::System>>::In, <Func as Adapt<<S as bevy::prelude::IntoSystem<I, O, M>>::System>>::Out, (IsAdapterSystemMarker, I, O, M)>`
`IntoPipeSystem<A, B>` implements `bevy::prelude::IntoSystem<IA, OB, (IsPipeSystemMarker, OA, IB, MA, MB)>`
required for `fn(On<'a, 'b, Add, Self>, ...) {<... as EntityBlueprint>::hydrate}` to implement `IntoObserverSystem<_, _, _>`
Why is this the case? How should I define my trait implementation to workaround this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have the above implementation of a trait where users should be allowed to define their own trigger parameters. However,
Self::hydratecannot become anObserverSystem, with error messageWhy is this the case? How should I define my trait implementation to workaround this?
Beta Was this translation helpful? Give feedback.
All reactions