引擎生态
支持状态总览
| 引擎 | 状态 | 插件仓库 | 文档 |
|---|---|---|---|
| Unity / 团结引擎 | ✅ 已完成 | leanclr-unity | Unity 集成 |
| Godot | 🚧 开发中(预计 2026-10 预览) | leanclr-godot | Godot |
| Unreal Engine | 🚧 开发中 | leanclr-unreal | Unreal |
| Cocos Engine | 🚧 开发中 | leanclr-cocos | Cocos |
分工说明
leanclr → 运行时核心 + LeanAOT + pgo2aot(C++ / .NET 工具链)
leanclr-unity → Unity Editor 集成、构建管线 Hook、项目设置
leanclr-godot → Godot 扩展(开发中,仓库占位)
leanclr-unreal → Unreal 插件(开发中,仓库占位)
leanclr-cocos → Cocos 插件(开发中,仓库占位)
引擎插件负责在各引擎的发布管线中替换或对接原生后端;底层 CLR 行为、AOT 规则、PGO 等概念在各引擎间共用,详见 AOT 概述。
Unity
当前最成熟的集成路径。发布 WebGL / 小游戏时自动用 LeanCLR 替换 IL2CPP,显著减小 wasm 体积并降低元数据与托管内存占用。
Godot
官方仓库 leanclr-godot 已创建,插件实现进行中。
Unreal Engine
官方仓库 leanclr-unreal 已创建,实现进行中。
Cocos Engine
官方仓库 leanclr-cocos 已创建,实现进行中。