bevyengine / bevyengine/bevy

Watching entity after spawning an observer can contribute to unnecessary bugs

Open
#14,694 0 comments 2 reactions 0 assignees View on GitHub
A-ECS C-Usability S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

The observer function [watch_entity](https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.Observer.html#method.watch_entity) documentation states that watching entities after observer has been spawned will produce no effects. In some situations this may lead to unnecessary and unintended bugs if the instance of the observer is being kept alive and used to watch entities beyond next world synchronization point. If possible, is there a reason not to panic in this situation to make sure the user realizes that watching an entity with spawned observer instance has no effect?

Contributor guide

Open the contributing guide

Research direction

Start with the linked Observer::watch_entity documentation and inspect the observer lifecycle around watching entities after spawning. Determine whether this state should panic or remain a documented no-op; done means the behavior and its rationale are clear to callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.