specs
specs copied to clipboard
More in-depth explanations of component removal and adding
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).
Would love to see this too.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Feel free to comment if this is still relevant.
This seems still relevant; I'm thinking that maybe we could solve this by adding a demo.
I can spend some time on this, can we agree on a broad set of changes?
What we have now:
- Chapter 06 (System Data) contains a small part about adding and removing components
What I assume we want:
- Chapter 06 focuses on System Data (add/removal of components is split out)
- A new chapter addresses common Component usecases
I'm not quite sure myself where this could fit into. In any case, putting all component related docs in the same place + referencing those sections seems like a good idea.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Feel free to comment if this is still relevant.
I'm not quite sure myself where this could fit into. In any case, putting all component related docs in the same place + referencing those sections seems like a good idea.
I know this is closed but this is still really relevant. Like, we still haven't figured out how to do this: and a canonical example of non-lazily deleting entities from some component inside a loop without drain()
I'd like to spend time working on this. Would need some sort of guidance though on what exactly to add though. Maybe we can agree on a list of stuffs to write about? cc: @torkleyy