Beispiel #1
0
	public static Delegate UnityEngine_Events_UnityAction(LuaFunction func)
	{
		UnityEngine.Events.UnityAction d = () =>
		{
			func.Call();
		};
		return d;
	}
Beispiel #2
0
	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);
	}
Beispiel #4
0
 public static void OnSharpCall(LuaTable self, LuaFunction func) {
     func.Call(self);
 }