Closed hendrik-schulte closed 5 years ago
Hey folks,
Im instantiating a prefab using the following code:
Container .Bind(typeof(SomeClass), typeof(ISomeInterface)) .FromComponentsInNewPrefab(prefab) .WithGameObjectName(prefab.name) .AsCached() .OnInstantiated((c, instance) => OnInstantiated(instance as SomeClass)) .NonLazy();
However, the OnInstantiated callback is not called! When changing the second line to the follwowing, it works just fine.
Container .BindInterfacesAndSelfTo<SomeClass>() .FromComponentsInNewPrefab(prefab) .WithGameObjectName(prefab.name) .AsCached() .OnInstantiated((c, instance) => OnInstantiated(instance as SomeClass)) .NonLazy();
I think this is not intended behaviour. I'm on Zenject 7.3.1 and Unity 2018.2.7f1.
Thank you and keep up the great work!
Should be fixed now, thanks for the report
Hey folks,
Im instantiating a prefab using the following code:
However, the OnInstantiated callback is not called! When changing the second line to the follwowing, it works just fine.
I think this is not intended behaviour. I'm on Zenject 7.3.1 and Unity 2018.2.7f1.
Thank you and keep up the great work!