jeudi 18 juillet 2019

Is Unity's component instantiation an anti pattern?

I'm reading a book Dependency Injection Principles, Practices, and Patterns, which mentions constrained construction being an anti pattern. In Unity pretty much everything derived from its built in class has an inaccessable constructor, and the Awake() or Start() are rather "constrained" too. Sometimes I have to use a separate "Init" function, but by the book mentioned above, it'd be a temporal coupling, another bad practice. So I wonder if Unity's design is an anti pattern of some sort?

Aucun commentaire:

Enregistrer un commentaire