bevyengine / bevyengine/bevy

Invalid children when working with dynamic scenes due to partial extraction

Open
#12,449 0 comments 3 reactions 0 assignees View on GitHub
A-Scenes C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

0.13.1

## What you did

1. Extract entities into a dynamic scene, extracting the parents but not the children.
2. Spawn the scene back in.

https://gist.github.com/tomara-x/24c4677068254e59941d5389340d7069

## What went wrong

The newly spawned `Parent` component contains references to invalid entities.

## Additional information

Reported by @tomara-x [on Discord](https://discord.com/channels/691052431525675048/749335865876021248/1217171397466521741).

Contributor guide

Open the contributing guide

Research direction

Start with the linked reproduction gist and trace the dynamic-scene extraction and scene-spawning paths it exercises. Reproduce the case where parents are extracted without children, then verify that spawning the scene does not leave Parent components containing invalid entity references.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.