ssannandeji / Zenject-2019

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

Binding things from Game Object Context to Scene Context? #579

Closed Risthart closed 5 years ago

Risthart commented 5 years ago

Hello. I have a difficult time understanding binding between context levels (Project/Scene/Game Object). I know that I can bind a MonoBehaviour (facade) with a Game Object Context to my Scene Context via Zenject Binding, but there is a problem. My facades are not MonoBehaviours so I can't use Zenject Bindings. I want to keep all MonoBehaviours as the views of my facades. Any suggestions on that?

Risthart commented 5 years ago

Ok, I've found the answer to my question. Read the "GameObjectContext Example Without MonoBehaviours" part of this page https://github.com/svermeulen/Zenject/blob/master/Documentation/SubContainers.md