/// <summary> /// 执行脚本 /// </summary> public static void RunAsync() { string file = Cache.runPath + "script\\test.lua"; string fun = "Main"; // var bl = eng.Load(file, fun); int param1 = 1; int param2 = 2; int param3 = 3; eng.RunAsync(file, fun, param1, param2, param3); Console.WriteLine(Cache.res.ToJson()); Console.WriteLine("Unload结果:" + (Cache.res.Count > 0)); }
public void RunAsync() { string file = Cache.runPath + "script\\test.lua"; string fun = "Main"; // var bl = eng.Load(file, fun); int param1 = 1; int param2 = 2; int param3 = 3; eng.RunAsync(file, fun, param1, param2, param3); Thread.Sleep(10000); Console.WriteLine(Cache.res.ToJson()); Assert.IsTrue(Cache.res.Count > 0); }