title: How to setup Zenject that when an interface is requested, it setups up a new game object, and returns the a newly bound class instance
body: <p>Zenject is great, but I haven't found a solution that feels right, for instantiating a game object </p>
  
  <p>I have a script, that provides various event hooks for monobehaviour events.  Start, PostStart, Update, FixedUpdate, and others, so non-Unity controllers can execute in at certain events.  It is based on an interface I named "IEventsController"</p>
  
  <p>My setup before, would have been something like this:</p>
  
  <pre><code>private static IEventsController _Events;
  public static IEventsController GetEvents()
  {
      if (_Events == null) 
      {
          var go = new GameObject("EventsController");
          _Events = go.AddComponent&lt;EventsController&gt;();
      }
  
      return _Events;
  }
  </code></pre>
  
  <p>I'm trying to figure out if Zenject has a built in solution for this.  I could use a factory or a method, but the factory has a whole extra class to manage this when Zenject might already handle it.  Using a method to generate this still requires the static reference to check if its been created or not, and it feels wrong for that to sit in the installer script.  Also, there is the FromComponent Series of bindings that might have something for this, but nothing I've seen so far.</p>
  
  <p>A sample binding method call I might expect:</p>
  
  <pre><code>Container.BindComponent&lt;IEventsController&gt;()
     .To&lt;EventsController&gt;()
     .ViaNewGameObject("Events Controller");
  </code></pre>
  
  <ul>
  <li>Thanks.</li>
  </ul>