bevyengine / bevyengine/bevy-website
Need better guidance / design patterns for dyn traits in components.
Open
A-Book
C-Content
- Dominant language
- JavaScript
- Stars
- 249
- Forks
- 450
- Avg merge
- 16h 20m
- Merged PRs (30d)
- 6
Description
One area that I still struggle with is dyn traits inside of ECS components. Examples of questions that arise frequently:
* Do I really need to use Arc here, or can I get away with using Box?
* Under what circumstances do I need to use a mutex?
* Do I need to blindly add Send + Sync + 'static to every trait declaration, or can I get away with just some of them?
* I want to downcast the dyn trait in the component into some other trait, what's the best way to do that?
It would be nice if there was a guide which explored these questions in some depth.
Contributor guide
Assessment
This issue has not been assessed yet.