xLua
xLua copied to clipboard
当函数参数是GameObject时,误传入一个LuaTable对象,没有类型报错
-
实现一个静态的c#方法,以GameObject为参数
public static void SetPosition(GameObject go,float x,float y,float z) -
lua 层调用的时候,传入了错误参数,传 luatable对象时,不仅没有报错,还会在场景中创建一个 New Game Object。
local t= {}SetPosition(t,0,0,0)
希望能报个类型错误,如果有性能问题,至少在editor下检查。
要是支持强类型就没这个问题了