Real-Serious-Games / Unity-Dependency-Injection-Example

An example that shows how simple Unity scene-based dependency injection can be.
MIT License
26 stars 4 forks source link

ResolveSubset script doesn't work #1

Open roymina opened 5 years ago

roymina commented 5 years ago

screenshot after play the injection is still empty

EtienneCowley commented 4 years ago

To fix this issue, in the DependencyResolver.cs script at line 496 - update the Resolve(GameObject parent) method as follow: ` public void Resolve(GameObject parent)

{

    var gameObjects = new List<GameObject> { parent };

    foreach (Transform childTransform in parent.transform)
        gameObjects.Add(childTransform.gameObject);

    Resolve(gameObjects);
}

`