xLua icon indicating copy to clipboard operation
xLua copied to clipboard

当函数参数是GameObject时,误传入一个LuaTable对象,没有类型报错

Open whitecostume opened this issue 4 years ago • 1 comments

  1. 实现一个静态的c#方法,以GameObject为参数 public static void SetPosition(GameObject go,float x,float y,float z)

  2. lua 层调用的时候,传入了错误参数,传 luatable对象时,不仅没有报错,还会在场景中创建一个 New Game Object。 local t= {} SetPosition(t,0,0,0)

希望能报个类型错误,如果有性能问题,至少在editor下检查。

whitecostume avatar Sep 04 '21 10:09 whitecostume

要是支持强类型就没这个问题了

uniqss avatar Jan 11 '22 01:01 uniqss