我创建了安装程序,使用脚本创建了一个预制件,然后将其附加到 SceneContext。但是当我运行时出现此错误
“ZenjectException:断言命中!在上下文'SceneContext'的安装程序属性中找到名称为'Installer'的预制件。您应该为此使用属性'InstallerPrefabs'。”
public class DefaultInstaller : MonoInstaller
{
public override void InstallBindings()
{
Container.Bind<IController>().To<RandomNumberController>().AsSingle();
}
}
有什么建议么?