Open NoxMortem opened 5 years ago
Found during reporting https://github.com/modesttree/Zenject/issues/638
Documentation
If the dependency is a primitive type (eg. int, float, struct) then it will be injected with its default value (eg. 0 for ints).
This causes a NullReference
public void Inject([InjectOptional] LayerController layerController, [InjectOptional] int controlsLayer)
This does not:
public void Inject([InjectOptional] LayerController layerController, int controlsLayer = 0)
Found during reporting https://github.com/modesttree/Zenject/issues/638
Documentation
This causes a NullReference
This does not: