Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question is VContainer officially supported by unity? im looking for zenject replacement.

Discussion in 'General Discussion' started by virtouso, Aug 14, 2023.

  1. virtouso

    virtouso

    Joined:
    Jul 12, 2013
    Posts:
    58
    as a developer that care about good design patterns, i always use unity with zenject as DI container.

    zenject is sometimes that does not get any updates anymore.

    recently i saw that unity official netcode tutorial uses VContainer. does it mean that its the standard Container and suggested by the unity?
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,754
    No, it's not official. The demo team simply chose VContainer to plug the shortcomings of the default engine architecture. However, it is a nod towards the solution as being a viable one.
     
    virtouso likes this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
    No. Unity most likely picked it because it's the only actively developed free open source dependency injector. Like you noticed Zenject (and the fork of it Extenject) have been abandoned. There is the paid asset Init(args) but they wouldn't be able to freely distribute that with a demo project.

    https://assetstore.unity.com/packages/tools/utilities/init-args-200530