UnLuaNova¶
面向 Unreal Engine 的 Lua 脚本方案 —— Tencent/UnLua 的社区续作。 保留 UnLua 的编程手感,补上它缺失的维护、性能与可观测性。
三个关键增量¶
五分钟跑起来¶
- 把
Plugins目录复制到你的 UE 工程根目录 -
初始化子模块 —— 不初始化会缺 VM 源码:
git submodule update --init --recursive -
重启工程,新建蓝图
- UnLuaNova 工具栏 →
绑定→ 填入 Lua 模块路径(如GameModes.BP_MyGameMode) 创建 Lua 模版文件→ 在Content/Script/GameModes/BP_MyGameMode.lua里写代码
第一次接触?UE 新手快速上手 有每一步的截图。
中文文档¶
English Docs¶
-
Core concepts: binding, calling the engine from Lua, calling Lua from the engine, GC.
-
Language features, sandboxing, native breakpoints and luau-analyze on the Luau backend.
-
C++ API, Lua API and the build-time macros.
-
How Blueprint events get replaced by Lua implementations.
-
Frequently asked questions.
状态¶
| 项 | 值 |
|---|---|
| 引擎基线 | UE 5.8.3(源码版) |
| Lua 后端 | Luau(默认) / Lua 5.5 —— 均以子模块引入 |
| 上游基线 | Tencent/UnLua v2.3.6 + develop(2026-04) |
| 许可 | MIT |
早期阶段
项目仍在早期重构阶段,改动会比较频繁:适合尝鲜、提 issue、一起 push,暂不建议直接上生产。
已知事项见仓库根目录的 CHANGELOG.md。
从 UnLua 迁移¶
Lua 全局名 UnLua → UnLuaNova,UCLASS 与 ini section 同步改名(需 resave 资产):
local M = UnLua.Class() -- UnLua
local M = UnLuaNova.Class() -- UnLuaNova
上游 2019–2023 年的历史变更见 Archive/UnLua_CHANGELOG.md(本站导航未收录,请从仓库查看)。
觉得有用?给 HUSTJJD/UnLuaNova 点个 Star ⭐