diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs index 4bdc7572e02e0..b559b78dcb1b2 100644 --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -202,7 +202,7 @@ pub enum StorageType { } /// Stores metadata for a type of component or resource stored in a specific [`World`]. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ComponentInfo { id: ComponentId, descriptor: ComponentDescriptor, @@ -315,6 +315,7 @@ impl SparseSetIndex for ComponentId { } /// A value describing a component or resource, which may or may not correspond to a Rust type. +#[derive(Clone)] pub struct ComponentDescriptor { name: Cow<'static, str>, // SAFETY: This must remain private. It must match the statically known StorageType of the