NoToLuaAttribute 在继承后重载失效
niqibiao opened this issue · 0 comments
niqibiao commented
Source Code
namespace Runtime
{
public class Animal
{
public void Test()
{
}
[NoToLua]
public void Test(int i)
{
}
}
public class Duck : Animal
{
public void Test(int i, int j)
{
}
}
}
Wrap Code
public class Runtime_DuckWrap
{
// ...
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int Test(IntPtr L)
{
try
{
int count = LuaDLL.lua_gettop(L);
if (count == 1)
{
Runtime.Duck obj = (Runtime.Duck)ToLua.CheckObject<Runtime.Duck>(L, 1);
obj.Test();
return 0;
}
else if (count == 2)
{
Runtime.Duck obj = (Runtime.Duck)ToLua.CheckObject<Runtime.Duck>(L, 1);
int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
obj.Test(arg0);
return 0;
}
else if (count == 3)
{
Runtime.Duck obj = (Runtime.Duck)ToLua.CheckObject<Runtime.Duck>(L, 1);
int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
obj.Test(arg0, arg1);
return 0;
}
else
{
return LuaDLL.luaL_throw(L, "invalid arguments to method: Runtime.Duck.Test");
}
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
}
[NoToLua]
DuckWrap.Test(int i) wrap code was generated