Function bevy_pigeon::app::comp_recv
source · [−]pub fn comp_recv<T, M>(
server: Option<ResMut<'_, Server>>,
client: Option<ResMut<'_, Client>>,
q: Query<'_, '_, (&NetEntity, &mut NetComp<T, M>, &mut T)>
) where
T: Clone + Into<M> + Component,
M: Clone + Into<T> + Any + Send + Sync,
Expand description
A system that receives messages of type M
and applies it to component T
.
Most of the time, you will call sync_comp
which will add this system.
Only add it manually if you know what you are doing and want custom control over when it runs.