Has anyone an idea, how to write a C# function which will return a LuaTable value (for example {1 = "example1", 2 = 234, "foo" = "Foo Example"}
?
All types I've tested are returning LuaUserData
values which are non pair/ipairable.
Thanks in advance.
--update-- The closest type to luaTable is in my opinion ListDictionary:
[LuaFunc(Name = "table", Desc = "returns test LuaTable", Params = new string[] { })]
public System.Collections.Specialized.ListDictionary table()
{
var k = new System.Collections.Specialized.ListDictionary(){
{"1",1},
{2,"2"}
};
return k;
}
But it's still recognized in Lua as LuaUserData and can not be pair/ipaired