I would like to iterate through something like this:
public readonly IDictionary<int, Entity> Entities = new Dictionary<int, Entity>();
In Lua, whilst using MoonSharp. From the docs, it appears that MoonSharp handles automatic conversion to a table for IDictionary
types?
However, trying to do something like this ...
for k,v in pairs(World.Entities) do
-- something
end
... is giving me:
ScriptRuntimeException: bad argument #1 to 'next' (table expected, got userdata)
Is there something I'm missing as to why MoonSharp isn't converting my dictionary into a table?
Thanks!