3

I am programming in Lua 5.0.2 script language and I want to load my own C# DLL and call it's function in my Lua code.

This function is such as below:

string Concat(string S1, string S2)
{
   return S1+S2;
}

Is there anyway to reach this goal? Help me Please.

SMD
  • 333
  • 1
  • 2
  • 10

1 Answers1

0

I'm not familiar with C#, but you can first try using this answer to call C# functions from C: Calling C# from C

After you do that, you can create Lua C functions that call the C# functions, and load those as normal.

Community
  • 1
  • 1
Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85