Ulua_toLua_基本案例(六)_LuaCoroutine2 using UnityEngine; using System.Collections; using LuaInterface; public class TestCoroutine2 : MonoBehaviour { LuaState luaState = null; string script = @" function CoExample() WaitForSeconds(2) print('WaitForSeconds…
Ulua_toLua_基本案例(八)_LuaAccessingArray using UnityEngine; using LuaInterface; public class AccessingArray : MonoBehaviour { private string script = @" function TestArray(strs) local len = strs.Length for i = 0, len - 1 do print(strs[i]) end return 1, '…
Ulua_toLua_基本案例 在Untiy中用Lua.必需要LuaInterface.LuaInterface的介绍请看:点击打开链接 能够先光写Lua,生成.lua的纯文件.再Unity中通过,luaState.DoFile("main.lua");来执行.也能够直接在C#中写.用Lua.DoString()来转换. 大量项目的话,还是分开写好.lua用LuaStudio来开发. using UnityEngine; using System.Collections; using…
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>省市级联动</title> <script> //1.定义一个二维数组存储省市信息 var city = new Array(3); city[0] = new Array("长沙市","株洲市","湘潭市","衡阳…
在Untiy中用Lua.必需要LuaInterface. LuaInterface的介绍请看:点击打开链接 能够先光写Lua,生成.lua的纯文件. 再Unity中通过,luaState.DoFile("main.lua");来执行.也能够直接在C#中写. 用Lua.DoString()来转换.大量项目的话,还是分开写好,lua用LuaStudio来开发. using UnityEngine; using System.Collections; using LuaInterface;…