Пример #1
0
    void Awake()
    {
        var builder = new ContainerBuilder();

        builder.RegisterType <AutofaceMgr>();
        builder.RegisterType <AutoFaceBase>().As <IAutoFace>();
        using (var container = builder.Build())
        {
            manager = container.Resolve <AutofaceMgr>();
            manager.Init();
        }
        button.onClick.AddListener(ToLuaFunc);
    }
Пример #2
0
    void Awake()
    {
        var builder = new ContainerBuilder();

        builder.RegisterType <AutofaceMgr>();
        builder.RegisterType <AutoFaceBase>().As <IAutoFace>();
        using (var container = builder.Build())
        {
            manager = container.Resolve <AutofaceMgr>();
            manager.Init();
        }
        Btn_1.onClick.AddListener(UnityCallAndroid);
        Btn_2.onClick.AddListener(UnityCallAndroidToastMsg);
        Btn_3.onClick.AddListener(AndroidCallUnity);
    }