unity-hybridclr

Automate HybridCLR C# hot-update prebuild pipelines in the Unity Editor.

1.7k|162|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-hybridclr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-hybridclr
Source: https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/hybridclr
Command: npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-hybridclr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up and maintaining HybridCLR hot-update workflows in Unity involves many error-prone manual steps: configuring hot-update assemblies, compiling DLLs, generating AOTGenericReferences and link.xml, and staging artifacts for bundle builds. This Skill automates the entire prebuild pipeline through reflection-based Editor APIs, with diagnostics that catch misconfiguration before it breaks runtime hot updates.

Core Features & Use Cases

  • Settings & Environment Management: Read and write HybridCLRSettings, probe il2cpp_plus installation state, and resolve all input/output paths per build target.
  • Compile & Generation Pipeline: Compile hot-update DLLs, run the full GenerateAll prebuild pipeline or individual steps (link_xml, aot_dlls, method_bridge, aot_generic_reference).
  • Diagnostics & Validation: Run pre-flight checks that return categorized errors and warnings, and verify AOTGenericReferences.cs stays in sync with patchAOTAssemblies settings.
  • YooAsset Integration: Stage compiled DLLs as .bytes TextAssets into a collector directory so YooAsset can pack them into bundles.
  • Use Case: After editing hot-update C# code, call hybridclr_compile_dlls for Android, verify no assemblies are missing, copy the DLLs into Assets/HotUpdateDlls as .bytes, then trigger a YooAsset bundle build — all without touching the Editor menus.

Quick Start

Ask the AI to run hybridclr_status to check whether HybridCLR is installed and correctly configured in the current Unity project.

Frequently Asked Questions about unity-hybridclr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile HybridCLR hot-update DLLs in Unity?

Call hybridclr_compile_dlls with a buildTarget such as Android to run CompileDllCommand, which outputs DLLs to HybridCLRData/HotUpdateDlls/<target>. Then verify with hybridclr_get_hotupdate_dlls that no configured assemblies are missing.

How to set up HybridCLR hot update with YooAsset in Unity?

Configure hotUpdateAssemblyDefinitions via hybridclr_settings_set, run hybridclr_generate_all once, then use hybridclr_copy_hotupdate_dlls to stage DLLs as .bytes files into a YooAsset collector directory. YooAsset packs them into bundles; runtime loading code is written manually.

Does HybridCLR work with the Mono scripting backend?

No, HybridCLR requires the IL2CPP scripting backend because it patches libil2cpp to load hot-update assemblies. Running hybridclr_validate_setup on a Mono project reports this as a blocking error.

Why does hybridclr_compile_dlls block the Unity Editor?

Compilation and generation commands are synchronous main-thread Unity APIs with no async job boundaries, so the Editor and the REST server stall for minutes. Raise the client timeout to at least 10 minutes, or run the equivalent menu methods headless via unity-cli in batch mode.

When should I re-run HybridCLR GenerateAll?

Re-run hybridclr_generate_all only when AOT-side code changes, when hot-update assemblies are added or removed, or before shipping a new player build. Iterative hot-update changes only need hybridclr_compile_dlls, not a full regeneration.

Can I install HybridCLR automatically through this skill?

No, installation is deliberately not exposed because it clones two git repositories and copies the editor il2cpp tree with no progress or cancellation. Use the HybridCLR/Installer menu window, and check state with hybridclr_install_status.