So im just trying to remove a component from my player entity, but when I do so, the player gets removed from all systems that it belongs to. There is something about when the entity gets marked with WaitingToRefreshComponents (which happens after calling Detatch) it gets contains == true in this piece of code in EntityProcessingSystem.cs.
internal virtual void RefreshEntityComponents(Entity entity)
{
var contains = entity.SystemBits[Index];
var isInterested = Aspect.Matches(entity.ComponentBits);
if (contains)
Remove(entity);
else if (isInterested)
Add(entity);
}
The player entity is currently being handled by 3 of my systems, and then I’ve just attached a dummy component which isnt part of any system, and detached that one. And still my player entity gets removed from every system after that.