Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.54 KB

File metadata and controls

59 lines (39 loc) · 3.54 KB

LeanCLR for Unity

Languages: 中文 | English

GitHub Gitee LeanCLR license Discord

leanclr-unity (package com.code-philosophy.leanclr) is the Unity integration package for LeanCLR. It replaces IL2CPP with LeanCLR when you ship to WebGL, mini-game, and similar targets.

Advantages over IL2CPP

With selective AOT via aot.xml / PGO, compared to IL2CPP full AOT you typically get:

  • AOT code size: about 70%–90% less native code from managed compilation (hot/necessary methods AOT’d; rest interpreted with controllable performance impact)
  • Memory: about 20%–35% lower VM memory, plus a modest drop in managed heap use
  • Large projects: lazy load and hot update support tens of MB of managed logic while meeting mini-game package limits
  • GC: precise mark-sweep GC with higher reclamation efficiency and faster collections

See the Unity integration docs.

Documentation

Full documentation: https://doc.leanclr.com

Topic Link
Unity integration overview doc.leanclr.com/docs/ecosystem/unity/
Installation Install
Project settings Settings
Concepts (AOT / lazy load / hot update) Concepts
Build & CompileDll Build
Code hot update Hot update
Runtime & AOT LeanCLR docs home

Quick start

In Unity Package Manager → Add package from git URL, use:

  • https://github.com/focus-creative-games/leanclr-unity.git
  • https://gitee.com/focus-creative-games/leanclr-unity.git

After install, open LeanCLR → Settings..., enable the integration, and follow the docs to publish a Player. Sample project: leanclr-unity-demo.

Related repositories

Repository Description
leanclr LeanCLR runtime and toolchain
leanclr-doc Documentation site source
hybridclr Unity native C# hot update (complementary)

Support and contact

License

MIT License