'Hello World Example For Sub-Containers/Facade' example in Zenject Tutorial
using Zenject;
public class TestInstaller : MonoInstaller<TestInstaller>
{
public override void InstallBindings()
{
Container.BindInterfacesAndSelfTo<GameController>().AsSingle();
Container.Bind<Greeter>().FromSubContainerResolve().ByMethod(Install_greeter).AsSingle();
}
private void Install_greeter(DiContainer sub_container)
{
sub_container.Bind<Greeter>().AsSingle();
sub_container.BindInstance("Hello world!");
}
}