Sending an array from C# to lua?


#1

I’m trying to build a menu using warmenu. I’d like to populate the menu options from a C# script I’m building. I have exported a function that the lua script calls, but can’t for the life of me figure out a way to format the data for the LUA component.

Items are stored in List<> container, is there a way I can encode/decode the data to be sent to the LUA component?

Any help would be greatly appreciated, I’m new to this whole LUA language =(.


#2

Maybe trigger a lua client event from the c# script, I am not sure if it’s possible but it should be I guess.


#3

Messagepack does that automatically for you and should convert List / Dict / Array to tables.


#4

Thank you sir, took a little messing around, but it’s working =).