Open kennir opened 4 years ago
Example code here:
public class EnemyFacade: MonoBehaviour { [Inject] public void Construct(int value) { Debug.Log(value); } public class Factory : PlaceholderFactory<string, int, EnemyFacade> { } } TestInstaller public override void InstallBindings() { Container.BindFactory<string, int, EnemyFacade, EnemyFacade.Factory>() .FromFactory<PrefabResourceFactory<int, EnemyFacade>>(); } Create enemyFacade by factory _factory.Create(prefabResource, 1)
I got error
ZenjectException: Unable to resolve 'int' while building object with type 'EnemyFacade'. Object graph: DefaultGameObjectKernel EnemyFacade
so How to pass value into facade ?
https://github.com/modesttree/Zenject/blob/master/Documentation/Factories.md#example
Example code here:
I got error
so How to pass value into facade ?