Lua_ uLua_C#调用Lua方法_019
来源:互联网 发布:linux系统编程 康华 编辑:程序博客网 时间:2024/05/19 13:25
using UnityEngine;using System.Collections;using LuaInterface;public class CallLuaFunction_01 : MonoBehaviour { private string script = @" function luaFunc(message) print(message) return 42 end "; // Use this for initialization void Start () { LuaState l = new LuaState(); // First run the script so the function is created l.DoString(script); // Get the function object LuaFunction f = l.GetFunction("luaFunc"); // Call it, takes a variable number of object parameters and attempts to interpet them appropriately object[] r = f.Call("I called a lua function!"); // Lua functions can have variable returns, so we again store those as a C# object array, and in this case print the first one print(r[0]); } // Update is called once per frame void Update () { }}
阅读全文
0 0
- Lua_ uLua_C#调用Lua方法_019
- Lua_ uLua_C#中使用Lua_016
- Lua_ uLua_Lua调用C#方法_020
- Lua_基本Lua语法
- Lua_ Lua加载WWW_022
- Lua_各种工具方法
- c++调用lua方法
- Lua脚本:Lua调用C实现方法
- Lua脚本:C调用Lua实现方法
- Lua中调用C++方法
- Lua中调用C++方法
- Lua的系统学习(杂)_在VS中使用Lua_将C#方法注册进入Lua并执行的操作步骤
- lua调用外部lua方法 (lua语言)
- Lua_第25章 调用 C 函数
- Lua_打印Lua对象对应的C++的类
- Lua_绑定tinyxml到Lua中解析XML
- Lua_在Lua中继承Cocos2dx的C++类
- Lua_ Lua结合BundleManager实现网络热更新_023
- drawerlayoutdemo2
- p37页 队列操作 p55中序转后序
- Http Resources
- hbase常识及habse适合什么场景 (总结5)
- 硕士生预答辩中存在的共性问题
- Lua_ uLua_C#调用Lua方法_019
- js实现表格的增删改查
- 关联容器------map与pair的使用
- Idea导出jar包
- android一键清除最近应用按钮
- 哈哈日语养成十个习惯让你“疯狂说日语”
- Android样式的开发:View Animation篇
- C语言开发中应该注意的一些问题
- C中表达式语句以及副作用和++,--的有关问题