For instance, I have a scene with 2 game objects. The first has CButton component and its name “Button01”, the second one has CActor with name “Actor01”. CActor is an abstract class with two public methods Activate and Deactivate. So the button’s component is dependent of CActor object.
I want to inject this dependency into CButton component automatically using a dependency injection.
Let another game object is placed at the scene with CCompositionRoot component. It’s the place where I initialize some container and other dependencies. All dependencies are related with the first scene.
And now the question is how should I work with dependencies on other scenes which will be loaded after the first one? Is there some configuration file of scene’s dependencies? Because an hirerarchy of a scene can be changed. And names of object can be changed too. So how to resolve this cases?