More in-depth explanations of component removal and adding
- Vorherrschende Sprache
- Rust
- Sterne
- 2.6k
- Forks
- 215
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
The information available in the book on component adding and removal (specifically within the `run()` function of a `System`) is quite brief. The only example completely avoids deletions which, at least for `LazyUpdate`, have a drastically different syntax from insertions.
Also, I would appreciate examples on how to do insertions and _especially_ deletions inside a `join()` loop. Insertions aren't that problematic because you usually aren't `join()`-ing over the component you're inserting into. But for deletion this is different.
I think that section would be much better if it addressed these issues. For instance, by giving an example using `drain()`, and a canonical example of non-lazily deleting entities from some component inside a loop without `drain()` (because maybe you don't want to remove _all_ of them).
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.