Ralith / hecs

A handy ECS
Apache License 2.0
967 stars 82 forks source link

Document CommandBuffer.remove() will not remove any if it does not match all components #355

Open jestarray opened 10 months ago

jestarray commented 10 months ago

https://docs.rs/hecs/latest/hecs/struct.CommandBuffer.html#method.remove

Remove components from entity if they exist

Mislead me into thinking "Oh, I can just specify a whole bunch of components and it will remove them if they don't exist"

When really it should be mentioned they must match all just like World.remove() https://docs.rs/hecs/latest/hecs/struct.World.html#method.remove

If any component in T is not present in entity, no components are removed and an error is returned.