Defold 1.4.3 has been released

The documentation is factory.set_prototype() and collectionfactory.set_prototype(), although I missed adding the prototype property.
I also noticed that part of the documentation has fallen away in the generation step:

factory.set_prototype():

  • Requires the factory to have the “Dynamic Prototype” set
  • Cannot be set when the state is COMP_FACTORY_STATUS_LOADING
  • Setting the prototype to “nil” will revert back to the original prototype.

The dynamic property setting allows you to set it dynamically at runtime.
It has the draw back that it cannot optimize the memory usage for each component world at creation time. I.e. the collection that holds the factory will use more memory.

@agulev explains it in a bit more detail here:

2 Likes