Uniject
Uniject copied to clipboard
Support for Start() method that fires after constructor but before the first Update()
Adds an optional overridable Start() method on TestableComponent that will be called after the constructor but before the first Update(). Included a test for verification.
The purpose of this is to allow authors to write Component classes that feel more like they inherited from MonoBehaviour. It is also sometimes desirable to guarantee that code executes after Awake() (which in this case is simulated by the constructor).
I'd like to add support for Awake() but can't see a viable way to do it with injection (Awake must be called after all objects are initialized).
Fixed per banderous's comment and merged into single commit.