Describe the bug When using PrefabFactory or InstantiatePrefabForComponent through a custom factory, the framework implies that additional data can be passed to the facade/installer. However, if the object contains a game object context, Zenject failes to resolve the passed parameters.
To Reproduce
Make a binding like Container.BindFactory<UnityEngine.Object, float, MyFacade, MyFacade.Factory>().FromFactory<PrefabFactory<float, MyFacade>>();
Pass the data on creation myFactory.Create(prefab, 2f)
Zenject fails to resolve the float if the given prefab has a game object context attached.
Steps to reproduce the behavior:
Expected behavior Data can be passed dynamically to prefab factories or custom factories that get a prefab at run time.
Extenject and Unity info (please complete the following information):
Describe the bug When using PrefabFactory or InstantiatePrefabForComponent through a custom factory, the framework implies that additional data can be passed to the facade/installer. However, if the object contains a game object context, Zenject failes to resolve the passed parameters.
To Reproduce
Container.BindFactory<UnityEngine.Object, float, MyFacade, MyFacade.Factory>().FromFactory<PrefabFactory<float, MyFacade>>();
myFactory.Create(prefab, 2f)
Steps to reproduce the behavior:
Expected behavior Data can be passed dynamically to prefab factories or custom factories that get a prefab at run time.
Extenject and Unity info (please complete the following information):
Additional context Noticed that doing the binding like:
makes it work. However in our case it's not good enough, as we want to pass the prefab (and the data) along in run time.