setUnitFactory method

void setUnitFactory(
  1. UnitFactory<Unit, Args> unitFactory
)

Sets the factory function used to create the initial unit.

This method must be called before buildUnit is invoked.

Implementation

void setUnitFactory(UnitFactory<Unit, Args> unitFactory) =>
    _unitFactory = unitFactory;