Open acoppes opened 6 years ago
Thank you I'll fix this
Is it fixed yet?
I was able to address this by changing ComponentWrapper.cs lines 82 and 149 from:
gameObjectEntity.EntityManager.RemoveComponent
I'm not 100% sure if this will have any other effects, but so far it has worked for me.
The above fix causes issues with setting GameObjects inactive. I'm no longer seeing the original issue in my code... but I've made other bug fixes in my own non-public branch.
When you remove a Component calling the manager.RemoveComponent(), the entity removing and remove are called to all groups interested in that component, however, they are called without that component.
I believe the system may want to react to the component being removed to remove data related to that component, in some cases with a reference to that data stored in the component itself or being used as identifier, etc.
To test it I am using the following code:
It fails also using the normal remove: