Install and Lua versions
Add ZLua via UPM, pick a Lua version in Settings, and finish local Install.
Initialize and minimal interop
Initialize, minimal C#→Lua and Lua→C#, and the first working interop path.
Build workflow
Generate, Lua Sync, and a release checklist for Il2Cpp Player.
EmmyLua debugger
Breakpoint-debug running Lua with EmmyLua under Editor Mono (common setup).
Lua calling C#
Access types, static/instance members, construction, and Event (add_/remove_).
C# calling Lua
GetFunction, module return conventions, and Editor/Player load paths.
Value types
Default cross-boundary shapes and common usage for enum, struct, and Nullable.
Function and Delegate
Three paths for Lua function ↔ C# Delegate and important caveats.
Arrays
Create, index, to_table, and to_bytes for one-dimensional and multidimensional arrays.
Generics
Construct and call closed generic types and generic methods from Lua.
ref / in / out
Default Opaque behavior for byref parameters and write-back rules.
LuaMarshalAs
Override default Marshal; Bytes / Opaque / UnpackedValues / Table / UserData and XML.
GC Marshal
Low-allocation Marshal patterns such as OpaqueValue, UnpackedValues, and string UserData.
Method overloads
Default dispatch, full-signature keys, LuaAlias, and register_method short names.
LuaAlias
[LuaAlias] renaming and XML (luaAliasXmlPaths / ZLuaAlias).
Extension methods
[LuaExtension] and XML attach C# extensions to the extended type's instance method table.
Common zlua library
The most-used zlua APIs day to day; the rest are in the Spec.
Third-party native modules
Dual-track integration for third-party Lua C modules such as socket / cjson — Editor (cpath) and Player (static RequireF).
Migration
4 items
Troubleshooting
Diagnose common ZLua issues and fixes (appendix).
Editor vs Player
Differences between Mono Editor and Il2Cpp Player dual runtimes (appendix).