A method in java returns an Array, and I want to manipulate the information from that array in Lua but it seems that Lua doesn't convert arrays to tables as I'd hoped.
Is there a way to do this?
For example I have this method in Java:
public Node[] getChildren(){
return children.toArray(new Node[children.size()]);
}
When I call this function from Lua I can't do anything with it or have to Instance it, iterate trough it and copy everything to a Lua-Table and then use it. Is there a way to convert the Array to a Lua-Table in Java and then return that?
EDIT: I use LuaJ and the LuaJava library.