This repo contains NLua as a Unity package. This repo is only for the convenience of using NLua within the Unity game engine.
- Unity 2019.4.26f1 or newer
- Install KeraLua's Unity package
To use this project, you can download the latest tagged release OR clone locally as a Git submodule -- either way, into your Unity project (2019.4.26+).
When cloning as a Git submodule, either clone from the unity-package branch or a tag like v1.5.9.
Once it's there, simply add the Unity package as a local package (from disk).
To use this project, ensure you already have a version of Unity downloaded with a Unity project open.
Ensure your Unity project is using Unity 2019.4.26 or newer.
- Download this project's tagged latest release, or clone this repo as a Git submodule.
- If cloning as a Git submodule, use the
unity-packagebranch or a tag such asv1.5.9.
- If cloning as a Git submodule, use the
- Ensure the NLua (Unity package) files are within your Unity project folder structure (either in or alongside your
Assets/folder) - In your Unity project, open the Unity Package Manager from the
Window > Package Managermenu. - In the package manager, add the
+button and choose "Add package from disk...". - Browse for the
package.jsonfile, and click Open on it.
After the above steps, Unity should now import your package.
Once Unity finishes compiling, you should be able to reference NLua code in your C# scripts, including both inside and outside of AssemblyDefinition-contained code!
Check out the original NLua repo if you wish to contribute!
If you have any suggestions or issues using the package in Unity, feel free to leave an issue.