perform-ecs
perform-ecs copied to clipboard
[Feature] Warn about or fail compilation if component fields are overlap on entity
Actual behaviour: Given 2 components with field name X When entity is created with given 2 components Then Entity will have only 1 field X (from last registered component_2) So value from component_1 is lost
Expected: Given 2 components with field name X When entity is created with given 2 components Then warn/error(or fail compilation) about there are 2 similar fields registered to not let tricky bugs appear
You're right - it is a place for tricky bugs to appear.
Compilation fails are not possible, as entities can be created in various combinations, but some runtime check would be helpful. Preferably not every time, but only the on the first time the given combination is used.
Will be added in next release, pretty soon I hope.
Thanks for idea! :)
Love the idea of dynamic component fields on entity!