Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Mar 12, 2021
1 parent 9a5d40c commit 75062f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,22 @@ impl World {
WorldCell::new(self)
}

/// Registers a new component using the given [ComponentDescriptor]. Components do not need to be manually
/// Registers a new component using the given [DataLayout]. Components do not need to be manually
/// registered. This just provides a way to override default configuration. Attempting to register a component
/// with a type that has already been used by [World] will result in an error.
///
/// The default component storage type can be overridden like this:
///
/// ```
/// use bevy_ecs::{component::{ComponentDescriptor, StorageType}, world::World};
/// use bevy_ecs::{component::{DataLayout, StorageType}, world::World};
///
/// struct Position {
/// x: f32,
/// y: f32,
/// }
///
/// let mut world = World::new();
/// world.register_component(ComponentDescriptor::new::<Position>(StorageType::SparseSet)).unwrap();
/// world.register_component(DataLayout::from_generic::<Position>(StorageType::SparseSet)).unwrap();
/// ```
pub fn register_component(
&mut self,
Expand Down

0 comments on commit 75062f3

Please sign in to comment.