using UnityEngine;
using XLua;
[LuaCallCSharp]
public class SpecialParam
{
public void DefaultParam(int arg0, string arg1 = "1", int arg2 = 2)
{
Debug.Log("arg0:" + arg0);
Debug.Log("arg1:" + arg1);
Debug.Log("arg2:" + arg2);
}
public void VariableParam(int arg0, params string[] args)
{
Debug.Log("arg0:" + arg0);
Debug.Log("args.length:" + args.Length);
foreach (string arg in args)
{
Debug.Log("可变参数:" + arg);
}
}
}
print('启动了Lua')
function init()
print("执行了Lua的全局方法init")--无参数的方法
CreatUnityObj()
end
functio