ssannandeji / Zenject-2019

Dependency Injection Framework for Unity3D
MIT License
2.53k stars 363 forks source link

[Question] DiContainer.Inject before Awake #633

Open Goncharuk-Nikita opened 5 years ago

Goncharuk-Nikita commented 5 years ago

Hello, I use the Addressable Assets package to create instances of my assets, and then I need to Inject them. In the screenshot below, I use two methods of creation, asynchronous and not.

image

In MonoInstaller, I call one of these methods to Instantiate my asset.

image

And this is the Cube component:

image

When Asset instantiated, then Awake method called first, then Injects SettingsService and then called Start. The question is, can I get the Awake method called after Inject in these two types of object creation? Any samples or something else, would be extremely grateful)

Thanks.