Set the collection component count when setting a dynamic prototype for a collection factory
Currently the default value is used. To optimize the memory it would be nice to have an option to set this count by code.
A good place would be an optional third argument to set_prototype().
collectionfactory.set_prototype('#factory', '/main/levels/level1.collectionc', 1024)
To improve the usability of this feature it would be nice to have another function that would tell the component count of a collection at runtime. In cases where it is already known, nil otherwise.
collectionfactory.get_component_count()
collectionproxy.get_component_count()
And what about collectionproxy.set_collection(), does it have the same issue as collectionfactory.set_prototype()?
The plan is to add per-collection counts for the components. I couldn't find a previous ticket for it, so we'll keep this one for now.
Related issues https://github.com/defold/defold/issues/6668