I have registered some Cs functions to Lua, with some parameters like:
Code: Select all
// csharp: Func(string a, int b=0)
Lua.RegisterFunction(nameof(Func), this, SymbolExtensions.GetMethodInfo(() => Func(string.Empty, 0)));
Code: Select all
// lua
Func("blah") // TargetParameterCountException: Number of parameters specified does not match the expected number.
Func("blah", 0) // it's ok, but too long