Question: Lifetime for components
Offen
- Vorherrschende Sprache
- Rust
- Sterne
- 2.6k
- Forks
- 215
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I use a "lifetime" component to handle entity's removing. This is pretty easy, as I can iterate all entities with "Lifetime" component and check if lifetime is still valid, otherwise delete entity.
I want to have the same for components. Some components should only live for "x" seconds.
Do you have any idea how to implement this?
I first thought of a lazy_exec with time delay (just removing comp from entity). The solution should be similar to lazy Update, some "Read" resource which can be written in parallel.
I do not want to iterate over all components.
I do not want a lifetime field in every component.
Thanks
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.