Re-add support for dynamic components (for scripting)
lambdadog opened this issue · comments
Description
It looks like previously support for dynamic components was added in #70, but it was unceremoniously removed in ee46654
, without any references to its addition or removal in the changelog at any point.
As far as I can tell, shred itself can currently already support for this by using "dynamic IDs" as per the ResourceId
documentation, it'd be nice to support this again in specs.
Motivation
Essentially what was noted in #64, engine and modding support that wish to dynamically create components via, for example, an embedded scripting language like Lua.
Drawbacks
Since the existing API can continue to be used by just wrapping this "with_id" API with an ID of 0, there should be exactly no drawbacks to adding this.
- Is it a breaking change? No
- Can it impact performance, learnability, etc? No
I'm absolutely open to work on this if it's approved. My Rust is a little rusty, but it should be a simple enough thing to implement since there's full support already existing in shred.
I've decided to just go ahead and use shred directly for my usecase.