ME FIRST GAMES
Menu

games for me and you

September 22nd, 2020

9/22/2020

0 Comments

 
Picture
🚀 Zenject, now known as Extenject is a dependency injection framework built specifically for Unity. Check out my previous post on dependency injection if you don't what know it is.

🧠 Completely free under the MIT license, Zenject allows you to loosely couple code and increase the flexibility of your code.

💻 Features
📌 Inject variables directly into MonoBehaviors and C# classes.
📌 Conditionally bind variables by type, name, parent, and more.
📌 Dynamically create objects via factories.
📌 Setup memory pools for object pooling.
📌 Unit test support and framework for easily testing your scenes and prefabs.

😃 My Experience
📌 Zenject makes it easy to swap out dependencies for different instances, making it easier to change feature requirements on the fly.
📌 It can be a pain integrating external assets and hooking them up to the dependency tree.
📌 There have been some strange show-stopping bugs, but the framework has greatly improved stability.
📌 Performance overhead exists, and diving into the Zenject source code will cause headaches.
📌 Onboarding a new developer takes longer, especially if they have no experience with Zenject.
📌 Once you get rolling with Zenject, it becomes extremely powerful, flexible, and can definitely help game developers in rapid agile development.

🤞 Features I want
📌 The ability to visualize the dependency graph anywhere and anytime.
📌 More internal optimizations: bye-bye FindObjectsOfType for ZenjectComponent.

✅ Conclusion If you're doing a lot of OOP, then dependency injection is awesome. It does take time to wrap your head around Zenject and how a certain project is using it. I think it's a good option, but an option I'm not going to use in my current solo games. In a project with loose ever-changing requirements, using Zenject will definitely pay off. Just know that it's not yet widely adopted, and the average Unity Developer will need extra time to learn.

⭐️ Follow https://twitter.com/mefirstgames

0 Comments



Leave a Reply.

    Picture
    Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
    GAMES HERE

    Red Matter

    Star Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.

    Archives

    April 2021
    February 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2019
    March 2019
    December 2018
    April 2018

    Categories

    All

    RSS Feed

Copyright (c) 2020 Me First LLC
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments