Skip to content

Access keys of LuaTable (LuaValueDictionary Keys) #208

@martin-obert

Description

@martin-obert

I would like to Dictionary<string, object> from LuaTable or LuaValue.

example

Dictionary<string, string> FromLuaTable(LuaTable table) {

var result = new Dictionary<string, string>()
foreach(var (string key, LuaValue value) in table.dictionary) // <-- dictionary is internal
{
    result[key] = value.Read<string>()
}
return result;
}

or I'm probably missing already existing solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions