In case you are interested in investigating a proper entity component system approach with Unity, I lately released the first version of Svelto ECS, with a porting of the Unity3D survival shooter included.
You can find the code and link to relative articles on Github
hey thanks Kru! My last article actually assumes that the previous ones were read, otherwise is a little bit cryptic. To have a complete view of how and why, it would be good to read these:
careful though, it’s a lot of theory. I posted also the ones related to the Inversion Of Control, because honestly it’s just an evolution of all my analysis of Unity and its framework design problems.
The question about what the difference between the Entity Component design of Unity and an Entity Component System is, is pretty common (has been asked in other similar threads). Unity uses an old approach of the Entity Component design, where the logic is still in the components. To have a better division of responsibilities and in order to simplify communication between entities (but also for many other reasons tbh), the ECS introduce the concept of systems (which I call engines), where all entities logic lies exclusively. Components are only data. If you think about it, it also makes sense. Several entities with the same behaviour share the same logic, so a System is what you could call normally a “manager” of entities.
P.S.: ECS is NOT a DI framework, I actually started it because of all the problems I found out with IoC containers (all explained in the articles linked above)