Closed gregee123 closed 7 years ago
sounds reasonable, will add this in. I think the original reason was as you say it would avoid triggering component removed for the entity, but if there are use cases where you need that then it will at least provide more use-case support for people. Will try to get this into the next release.
Maybe it would be more "canonical" if entity would implement IDisposable an then call its RemoveAllComponents() from Dispose()
This has been released in 0.8.0 feel free to re-open if there are any issues with this
Pool.RemoveEntity should call Entity.RemoveAllComponents().
Not only it's a little code cleanup but the real reason is it would fire component removed event. That way I can still find out if a given instance of a component was removed even if it's because of removing the whole entity. Would simplify disposing of some subscriptions to component property changes.
Also, this would add functionality through removing code.