Closed onatbas closed 7 years ago
@onatbas , this code may cause the memory leak. This assert may not be removed, as far as i know.
The reason you can't add the components is because the entity already contain the requested component.
@FrankStain is correct. This assert is intentional. If you want to add the component if it's missing, you'll need to check for its existence first.
… in a loop of entities_with_components
When looping through entitites with entities_with_components, this assertion prevents the assignments to the entity. Such as this:
It might be the design intention, but I wanted to create a pull request in case it isn't and I found the possible quick solution.