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); }
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); }