Bridge between Lua world and the .NET (compatible with .NET/UWP/Mac/Linux/Android/iOS/tvOS). NLua is a fork project of LuaInterface (from Fábio Mascarenhas/Craig Presti). You can use/instantiate any .NET class without any previous registration or annotation. NLua runs on top of KeraLua binding, it encodes the string using the ASCII encoding by default. If you want to use UTF-8 encoding, just set the Lua.State.Encoding property to Encoding.UTF8. Calling instance methods: To call instance methods you need to use the : notation, you can call methods from objects passed to Lua or to objects created inside the Lua context. Calling static methods: You can call static methods using only the class name and the . notation from Lua. If you are using Xamarin.iOS you need to Preserve the class you want to use inside NLua, otherwise the Linker will remove the class from final binary if the class is not in use.
Features
- Evaluate simple expressions
- Pass raw values to the state
- Retrieve global values
- Retrieve Lua functions
- Pass .NET objects to the state
- Use .NET assemblies inside Lua