0

I've created the installer, created a prefab with the script and then attached it to the SceneContext. But When I run I get this error

"ZenjectException: Assert hit! Found prefab with name 'Installer' in the Installer property of Context 'SceneContext'. You should use the property 'InstallerPrefabs' for this instead."

public class DefaultInstaller : MonoInstaller
{
    public override void InstallBindings()
    {
        Container.Bind<IController>().To<RandomNumberController>().AsSingle();
    }
}

Any suggestions?

1 Answers1

0

You should use the property 'InstallerPrefabs' for this instead

Have you considered referencing your prefab in the property InstallerPrefabs of SceneContext, instead of the property Installer?

2nd list in SceneContext's inspector, instead of 1st one:

SceneContext

hugo
  • 3,067
  • 2
  • 12
  • 22