hadashiA / VContainer

The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.
https://vcontainer.hadashikick.jp
MIT License
1.88k stars 163 forks source link

How to instantiate Singleton Component prefab after the bind automatically? #619

Open Watcher3056 opened 7 months ago

Watcher3056 commented 7 months ago

I have a CameraManager component on the prefab with camera. I want to bind it in the scope and automatically create it after bind. Else user would be not able to see the game...

Possible workaround would be to Invoke Resolve() in the Start() of LifetimeScope, but in the RootScope Start() is never invoking, because prefab of the RootScope never instantiated.