Add link to with_children in with_child doc (#14604)
# Objective Discourage users from using `with_child` for spawning multiple children. ## Solution Add link to `with_children` in docs for `with_child`.
This commit is contained in:
parent
9b254aab1e
commit
e164e5a873
@ -339,9 +339,17 @@ pub trait BuildChildren {
|
||||
type Builder<'a>: ChildBuild;
|
||||
|
||||
/// Takes a closure which builds children for this entity using [`ChildBuild`].
|
||||
///
|
||||
/// For convenient spawning of a single child, you can use [`with_child`].
|
||||
///
|
||||
/// [`with_child`]: BuildChildren::with_child
|
||||
fn with_children(&mut self, f: impl FnOnce(&mut Self::Builder<'_>)) -> &mut Self;
|
||||
|
||||
/// Spawns the passed bundle and adds it to this entity as a child.
|
||||
///
|
||||
/// For efficient spawning of multiple children, use [`with_children`].
|
||||
///
|
||||
/// [`with_children`]: BuildChildren::with_children
|
||||
fn with_child<B: Bundle>(&mut self, bundle: B) -> &mut Self;
|
||||
|
||||
/// Pushes children to the back of the builder's children. For any entities that are
|
||||
|
||||
Loading…
Reference in New Issue
Block a user