100coding
3/30/2017 - 11:16 AM

6886F7FB-AF5E-4D9D-8EF9-76BE8EC2BA7B

6886F7FB-AF5E-4D9D-8EF9-76BE8EC2BA7B

using UnityEngine;
using Zenject;

public class GameInstaller : MonoInstaller<GameInstaller>
{
    [SerializeField] private GameObject ship_prefab;

    public override void InstallBindings()
    {
        Container.BindInterfacesAndSelfTo<GameRunner>()
            .AsSingle();

        Container.BindFactory<Ship, Ship.Factory>()
            .FromSubContainerResolve()
            .ByNewPrefab(this.ship_prefab);
    }
}