parent
bfbcd47725
commit
708535536b
@ -565,6 +565,8 @@ impl<'w, 's, 'a> EntityCommands<'w, 's, 'a> {
|
|||||||
|
|
||||||
/// Adds a [`Bundle`] of components to the entity.
|
/// Adds a [`Bundle`] of components to the entity.
|
||||||
///
|
///
|
||||||
|
/// This will overwrite any previous value(s) of the same component type.
|
||||||
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// The command will panic when applied if the associated entity does not exist.
|
/// The command will panic when applied if the associated entity does not exist.
|
||||||
|
|||||||
@ -246,6 +246,9 @@ impl<'w> EntityMut<'w> {
|
|||||||
self.insert(bundle)
|
self.insert(bundle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Adds a [`Bundle`] of components to the entity.
|
||||||
|
///
|
||||||
|
/// This will overwrite any previous value(s) of the same component type.
|
||||||
pub fn insert<T: Bundle>(&mut self, bundle: T) -> &mut Self {
|
pub fn insert<T: Bundle>(&mut self, bundle: T) -> &mut Self {
|
||||||
let change_tick = self.world.change_tick();
|
let change_tick = self.world.change_tick();
|
||||||
let bundle_info = self
|
let bundle_info = self
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user