diff --git a/src/sync/ancestor_marker.rs b/src/sync/ancestor_marker.rs index d3f6636f..63b43506 100644 --- a/src/sync/ancestor_marker.rs +++ b/src/sync/ancestor_marker.rs @@ -98,11 +98,19 @@ impl Plugin for AncestorMarkerPlugin { /// A marker component that marks an entity as an ancestor of an entity with the given component `C`. /// /// This is added and removed automatically by the [`AncestorMarkerPlugin`] if it is enabled. -#[derive(Component, Reflect)] +#[derive(Component, Copy, Reflect)] +#[reflect(Component, Default)] pub struct AncestorMarker { + #[reflect(ignore)] _phantom: PhantomData, } +impl Clone for AncestorMarker { + fn clone(&self) -> Self { + Self::default() + } +} + impl Default for AncestorMarker { fn default() -> Self { Self { diff --git a/src/type_registration.rs b/src/type_registration.rs index d6d912b4..9d5840fc 100644 --- a/src/type_registration.rs +++ b/src/type_registration.rs @@ -1,6 +1,6 @@ use crate::{ prelude::*, - sync::{PreviousGlobalTransform, SyncConfig}, + sync::{ancestor_marker::AncestorMarker, PreviousGlobalTransform, SyncConfig}, }; use bevy::prelude::*; use broad_phase::AabbIntersections; @@ -68,6 +68,8 @@ impl Plugin for PhysicsTypeRegistrationPlugin { .register_type::() .register_type::() .register_type::() + .register_type::>() + .register_type::>() .register_type::() .register_type::() .register_type::()