简体   繁体   中英

Is there a way to embed C# code into a Lua script?

I have a program which forces Lua as a choice for programming plugins. I'd like to take some existing C# code, and use it in this program. Is this possible?

I should add that I know one can easily embed Lua code into C#, but I haven't found the reverse anywhere. Thanks guys!

Take a look at LuaInteface :

LuaInterface is a way for Lua programs to access the CLR (Common Language Runtime), otherwise known as .NET in the Windows world and Mono on Linux.

I'm not sure that's the official site, and there are multiple versions/forks (like MonoLuaInterface ). Just search for LuaInterface.

Lua is not compilable language, insteed of C#. So i see no way to embed lower lang onto script language :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM