File tree 1 file changed +3
-3
lines changed
crates/bevy_ecs/src/world 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -103,22 +103,22 @@ impl World {
103
103
WorldCell :: new ( self )
104
104
}
105
105
106
- /// Registers a new component using the given [ComponentDescriptor ]. Components do not need to be manually
106
+ /// Registers a new component using the given [DataLayout ]. Components do not need to be manually
107
107
/// registered. This just provides a way to override default configuration. Attempting to register a component
108
108
/// with a type that has already been used by [World] will result in an error.
109
109
///
110
110
/// The default component storage type can be overridden like this:
111
111
///
112
112
/// ```
113
- /// use bevy_ecs::{component::{ComponentDescriptor , StorageType}, world::World};
113
+ /// use bevy_ecs::{component::{DataLayout , StorageType}, world::World};
114
114
///
115
115
/// struct Position {
116
116
/// x: f32,
117
117
/// y: f32,
118
118
/// }
119
119
///
120
120
/// let mut world = World::new();
121
- /// world.register_component(ComponentDescriptor::new ::<Position>(StorageType::SparseSet)).unwrap();
121
+ /// world.register_component(DataLayout::from_generic ::<Position>(StorageType::SparseSet)).unwrap();
122
122
/// ```
123
123
pub fn register_component (
124
124
& mut self ,
You can’t perform that action at this time.
0 commit comments