I have a some Lua code that contains my business logic, which I would like to run inside .NET using NLua.
Some of my lua file currently use the "require" keyword in order to reference functions in other files. Now, this works fine if I run the code using e.g. ZeroBrane Studio. However, once I use "DoFile" to load the code into NLua, I get some "Module not found" errors.
My question is; can I use the concept of "require", when running the code inside NLua? If not, would I then need to remove these lines, before running DoFile on the files (and of course make sure to run the files in the correct order)?
Update: I think perhaps I simply need to add my Lua file folder to the package.path. I solved it by doing a DoString("package.path = '<my_path>' .. package.path");
Is this "best practise"?