# Objective The `Parent` component holds a reference to the parent entity of the entity it is inserted onto. The `with_child` function erroneously forgets to insert this component onto the child entity that it spawns, causing buggy behaviour when the function is used instead of the other child-spawning functions. ## Solution Ensure `with_child` inserts the `Parent` component, the same as all the other child-spawning functions. ## Testing Checked before/after with a bevy_ui layout where this patch fixed buggy behaviour I was seeing in parent/child UI nodes. |
||
|---|---|---|
| .. | ||
| components | ||
| child_builder.rs | ||
| events.rs | ||
| hierarchy.rs | ||
| lib.rs | ||
| query_extension.rs | ||
| valid_parent_check_plugin.rs | ||