/// <summary> /// 开始热更脚本逻辑 /// </summary> private void LoadScrpit(string root) { if (root != "") //热更代码模式 { ILRuntimeHelper.LoadHotfix(root); ILRuntimeHelper.AppDomain.Invoke("GFLauncherBridge", "Start", null, new object[] { true }); } else { //这里用反射是为了 不访问逻辑模块的具体类,防止编译失败 var assembly = Assembly.GetExecutingAssembly(); var type = assembly.GetType("GFLauncherBridge"); var method = type.GetMethod("Start", BindingFlags.Public | BindingFlags.Static); method.Invoke(null, new object[] { false }); } }