By default, Dialogue System's underlying Lua environment using Lua Interpreter, which is a cross-platform Lua interpreter written in C#.
You can, however, use NLua instead. NLua is written in C++ and interfaces with Unity using Unity 5/Unity 4 Pro's P/Invoke capability. If your project runs large blocks of Lua code, it may run faster in NLua. The Dialogue System itself runs so little Lua code that you generally will not see any performance difference between Lua Interpreter and NLua.
For more information on NLua, see www.nlua.org.
Before switching to NLua, be aware of these restrictions:
To switch to NLua, import Third Party Support/NLua Support.unitypackage
. You can then delete DLLs/LuaInterpreter.dll
if you want to shave a little off of your build size. (Deleting LuaInterpreter.dll
is optional.)
Optional: If you have unpacked the Dialogue System's source code, you can also unpack the NLua source code in Scripts/NLua Source Code.unitypackage
. Do not import this package unless you've unpacked the Dialogue System's source code, too.
To compile the Dialogue System's source code using NLua, define the preprocessor symbol USE_NLUA (Edit > Project Settings > Player -> Scripting Define Symbols).
<< Lua Console | Sequences >>