I have an embedded Player class.
public class PlayerInstaller : MonoInstaller
{
[SerializeField] private GameObject _playerPrefabs;
public override void InstallBindings()
{
var player = Container.InstantiatePrefabForComponent<Player>(_playerPrefabs);
Container.Bind<Player>().FromInstance(player).AsSingle();
}
}
But right now it not work too, but it worked before
I'm trying to inject a second class from the same instance:
Container.Bind<PlayerMovement>().FromComponentOn(player.gameObject).AsSingle()
and many-many options
but it still throws an error
ZenjectException: Unable to resolve 'PlayerMovement' while building object with type 'Flipper'. Object graph: Flipper