public static Delegate UnityEngine_Events_UnityAction(LuaFunction func) { UnityEngine.Events.UnityAction d = () => { func.Call(); }; return d; }
public static Delegate Action(LuaFunction func) { Action d = () => { func.Call(); }; return d; }
// Use this for initialization void Start () { LuaScriptMgr mgr = new LuaScriptMgr(); mgr.DoString(script); // Get the function object func = mgr.GetLuaFunction("luaFunc"); //有gc alloc object[] r = func.Call(123456); print(r[0]); // no gc alloc int num = CallFunc(); print(num); }
public static void OnSharpCall(LuaTable self, LuaFunction func) { func.Call(self); }