perform-ecs icon indicating copy to clipboard operation
perform-ecs copied to clipboard

[Feature] Warn about or fail compilation if component fields are overlap on entity

Open nanonull opened this issue 5 years ago • 2 comments

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

nanonull avatar Jun 01 '19 09:06 nanonull

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! :)

fireveined avatar Jun 02 '19 10:06 fireveined

Love the idea of dynamic component fields on entity!

nanonull avatar Jun 02 '19 12:06 nanonull