Compare commits

..

No commits in common. "v8.13.0" and "main" have entirely different histories.

9 changed files with 23 additions and 181 deletions

View File

@ -2,43 +2,38 @@
"versions": [
{
"unity_version":"2019",
"hybridclr" : { "branch":"v8.13.0"},
"il2cpp_plus": { "branch":"v2019-8.9.0"}
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2019-8.1.0"}
},
{
"unity_version":"2020",
"hybridclr" : { "branch":"v8.13.0"},
"il2cpp_plus": { "branch":"v2020-8.9.0"}
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2020-8.1.0"}
},
{
"unity_version":"2021",
"hybridclr" : { "branch":"v8.13.0"},
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2021-8.1.0"}
},
{
"unity_version":"2022",
"hybridclr" : { "branch":"v8.13.0"},
"il2cpp_plus": { "branch":"v2022-8.11.0"}
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2022-8.2.0"}
},
{
"unity_version":"2022-tuanjie",
"hybridclr" : { "branch":"v8.13.0"},
"il2cpp_plus": { "branch":"v2022-tuanjie-8.13.0"}
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2022-tuanjie-8.7.0"}
},
{
"unity_version":"2023",
"hybridclr" : { "branch":"v8.13.0"},
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v2023-8.1.0"}
},
{
"unity_version":"6000",
"hybridclr" : { "branch":"v8.13.0"},
"il2cpp_plus": { "branch":"v6000-8.13.0"}
},
{
"unity_version":"6000.3.x",
"hybridclr" : { "branch":"v6000.3.x-8.13.0"},
"il2cpp_plus": { "branch":"v6000.3.x-8.13.0"}
"hybridclr" : { "branch":"v8.7.0"},
"il2cpp_plus": { "branch":"v6000-8.7.0"}
}
]
}

View File

@ -50,7 +50,7 @@ namespace MonoHook
if (ptr == IntPtr.Zero)
return;
#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN)
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
uint oldProtect;
bool ret = VirtualProtect(ptr, (uint)size, Protection.PAGE_EXECUTE_READWRITE, out oldProtect);
UnityEngine.Debug.Assert(ret);
@ -223,7 +223,7 @@ namespace MonoHook
};
#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN)
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
[Flags]
public enum Protection
{

View File

@ -46,21 +46,12 @@ namespace HybridCLR.Editor.BuildProcessors
return;
}
BuildTargetGroup buildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);
#if UNITY_6000_0_OR_NEWER
NamedBuildTarget namedBuildTarget = NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup);
ScriptingImplementation curScriptingImplementation = PlayerSettings.GetScriptingBackend(namedBuildTarget);
#else
ScriptingImplementation curScriptingImplementation = PlayerSettings.GetScriptingBackend(buildTargetGroup);
#endif
ScriptingImplementation targetScriptingImplementation = ScriptingImplementation.IL2CPP;
if (curScriptingImplementation != targetScriptingImplementation)
{
Debug.LogError($"[CheckSettings] current ScriptingBackend:{curScriptingImplementation},have been switched to:{targetScriptingImplementation} automatically");
#if UNITY_6000_0_OR_NEWER
PlayerSettings.SetScriptingBackend(namedBuildTarget, targetScriptingImplementation);
#else
PlayerSettings.SetScriptingBackend(buildTargetGroup, targetScriptingImplementation);
#endif
}
var installer = new Installer.InstallerController();

View File

@ -64,9 +64,6 @@ namespace HybridCLR.Editor.BuildProcessors
return $"{projectDir}/Library/Bee/artifacts/PS4PlayerBuildProgram/ManagedStripped";
case BuildTarget.PS5:
return $"{projectDir}/Library/Bee/artifacts/PS5PlayerBuildProgram/ManagedStripped";
case BuildTarget.GameCoreXboxOne:
case BuildTarget.GameCoreXboxSeries:
return $"{projectDir}/Library/Bee/artifacts/GameCorePlayerBuildProgram/ManagedStripped";
#if UNITY_WEIXINMINIGAME
case BuildTarget.WeixinMiniGame:
return $"{projectDir}/Library/Bee/artifacts/WeixinMiniGame/ManagedStripped";

View File

@ -1,6 +1,3 @@
#if UNITY_6000_3_OR_NEWER && UNITY_EDITOR_OSX
#define NEW_IL2CPP_PATH
#endif
using System;
using System.Collections.Generic;
using System.IO;
@ -11,7 +8,6 @@ using Debug = UnityEngine.Debug;
using System.Text.RegularExpressions;
using System.Linq;
using HybridCLR.Editor.Settings;
using System.Runtime.InteropServices;
namespace HybridCLR.Editor.Installer
{
@ -37,15 +33,7 @@ namespace HybridCLR.Editor.Installer
{
_curVersion = ParseUnityVersion(Application.unityVersion);
_versionManifest = GetHybridCLRVersionManifest();
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => {
return _curVersion.isTuanjieEngine? v.unity_version == $"{_curVersion.major}-tuanjie"
#if UNITY_6000_3_OR_NEWER
: v.unity_version == "6000.3.x"
#else
: v.unity_version == _curVersion.major.ToString()
#endif
;
});
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => _curVersion.isTuanjieEngine ? v.unity_version == $"{_curVersion.major}-tuanjie" : v.unity_version == _curVersion.major.ToString());
PackageVersion = LoadPackageInfo().version;
InstalledLibil2cppVersion = ReadLocalVersion();
}
@ -139,11 +127,7 @@ namespace HybridCLR.Editor.Installer
case 2021: return "2021.3.0";
case 2022: return "2022.3.0";
case 2023: return "2023.2.0";
#if UNITY_6000_3_OR_NEWER
case 6000: return "6000.3.0";
#else
case 6000: return "6000.0.0";
#endif
default: return $"2020.3.0";
}
}
@ -174,28 +158,14 @@ namespace HybridCLR.Editor.Installer
public string Il2cppPlusLocalVersion => _curDefaultVersion?.il2cpp_plus?.branch;
public string ApplicationIl2cppPath
private string GetIl2CppPathByContentPath(string contentPath)
{
get
{
Debug.Log($"application path:{EditorApplication.applicationPath} {EditorApplication.applicationContentsPath}");
#if NEW_IL2CPP_PATH
#if UNITY_IOS
string platformDirName = "iOSSupport";
#elif UNITY_TVOS
string platformDirName = "AppleTVSupport";
#elif UNITY_VISIONOS
string platformDirName = "VisionOSPlayer";
#else
string platformDirName = "iOSSupport";
#endif
return $"{EditorApplication.applicationContentsPath}/../../PlaybackEngines/{platformDirName}/il2cpp";
#else
return $"{EditorApplication.applicationContentsPath}/il2cpp";
#endif
}
return $"{contentPath}/il2cpp";
}
public string ApplicationIl2cppPath => GetIl2CppPathByContentPath(EditorApplication.applicationContentsPath);
public string LocalVersionFile => $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/libil2cpp-version.txt";
private string ReadLocalVersion()
@ -296,23 +266,12 @@ namespace HybridCLR.Editor.Installer
// create LocalIl2Cpp
string localUnityDataDir = SettingsUtil.LocalUnityDataDir;
BashUtil.RecreateDir(localUnityDataDir);
#if !NEW_IL2CPP_PATH
// copy MonoBleedingEdge
BashUtil.CopyDir($"{Directory.GetParent(editorIl2cppPath)}/MonoBleedingEdge", $"{localUnityDataDir}/MonoBleedingEdge", true);
#endif
// copy il2cpp
BashUtil.CopyDir(editorIl2cppPath, SettingsUtil.LocalIl2CppDir, true);
#if NEW_IL2CPP_PATH
string buildDir = $"{SettingsUtil.LocalIl2CppDir}/build";
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm || RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
BashUtil.CopyDir($"{buildDir}/deploy_arm64", $"{buildDir}/deploy", false);
}
else
{
BashUtil.CopyDir($"{buildDir}/deploy_x86_64", $"{buildDir}/deploy", false);
}
#endif
// replace libil2cpp
string dstLibil2cppDir = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp";

View File

@ -24,7 +24,6 @@ HybridCLR扩充了il2cpp运行时代码,使它由纯[AOT](https://en.wikipedia
- [官方文档](https://www.hybridclr.cn/docs/intro)
- [快速上手](https://www.hybridclr.cn/docs/beginner/quickstart)
- [商业项目案例](https://www.hybridclr.cn/docs/other/businesscase)
- [LeanCLR](https://github.com/focus-creative-games/leanclr)
## 特性
@ -80,14 +79,6 @@ HybridCLR已经被广泛验证是非常高效、稳定的Unity热更新解决方
- 商业合作邮箱: business#code-philosophy.com
- [商业化支持](https://www.hybridclr.cn/docs/business/intro)
## 相关项目 LeanCLR
hybridclr仅是一个解释器模块,如果你需要一个完整小巧的适合发布到移动和小游戏平台的开源CLR实现,[LeanCLR](https://github.com/focus-creative-games/leanclr) 是当前最合适的方案。
LeanCLR 是一个面向全平台的精益 CLR(Common Language Runtime)实现。LeanCLR 在高度符合 ECMA-335 规范的前提下,提供更紧凑、易嵌入、低内存占用的运行时,实现对移动端、H5 与小游戏等资源受限平台的友好支持。LeanCLR原生支持 AOT + Interpreter 混合执行模式,内置 IL 与 IR 双解释器。
LeanCLR既可以独立嵌入到任何app和游戏项目,发布到任何平台,也可以**替代il2cpp作为Unity(团结引擎)发布到webgl和小游戏平台的运行时**。大幅缩减包体和内存开销。
## 关于作者
**walon** :**Code Philosophy(代码哲学)** 创始人

View File

@ -24,7 +24,6 @@ Welcome to embrace modern native C# hot update technology!
- [Official Documentation](https://www.hybridclr.cn/en/docs/intro)
- [Quick Start](https://www.hybridclr.cn/en/docs/beginner/quickstart)
- [Business Project Cases](https://www.hybridclr.cn/en/docs/other/businesscase)
- [LeanCLR](https://github.com/focus-creative-games/leanclr)
## Features
@ -78,12 +77,6 @@ You can view the [list of known top companies using HybridCLR and their launched
- Business cooperation email: business#code-philosophy.com
- [Commercial Support](https://www.hybridclr.cn/en/docs/business/intro)
## LeanCLR Project
HybridCLR is just an interpreter module. If you need a complete, compact, open-source CLR implementation suitable for mobile and mini-game platforms, [LeanCLR](https://github.com/focus-creative-games/leanclr) is currently the best solution.
LeanCLR can be embedded independently into any app or game project and published to any platform. It can also **replace il2cpp as the runtime for Unity (Unity Engine) when publishing to webgl and mini-game platforms**, greatly reducing package size and memory usage.
## About the Author
**walon**: Founder of **Code Philosophy (代码哲学)**

View File

@ -1,89 +1,5 @@
# ReleaseLog
## 8.13.0
Release Data: 2026-08-02.
### Runtime
- fix **CRITICAL**: set finalizer bit for Il2CppTypeDefinition.bitfield when defines Finalizer method in parent
- fix: TransformContext::CreateLoadExpandDataToStackVarVar create LdlocVarVar for generic enum type which underlying type size < 4 incorrectly. the right is LdlocExpandVarVar_xxx.
- fix: ComputLocationDescInfo may use uninitialized klass->has_references when compiler computes arguments from right to left
- fix: CallIntrp will save next instruction position to ip so in exception handler unwinding frame, a instruct adjacent to a try-catch block is treated as in try-block incorrectly
- merge: merge il2cpp changes from 6000.3.0 to 6000.3.21
- merge: merge il2cpp changes from 6000.0.60 to 6000.0.80
- merge: merge tuanjie il2cpp changes from 1.8.0 - 1.10.0
## 8.12.0
Release Date: 2026-06-01.
### Runtime
- fix: also setup packingSize to TypeDefinition.bitfield at bit position il2cpp::vm::kSpecifiedPackingSize so that Type.StructLayoutAttribute.Pack return the correct packingSize
- fix: get wrong packing and classSize for the struct when interpreter type contains a AOT generic struct
### Editor
- fix: correct conditional compilation macro of MonoHook for Windows standalone targeting
## 8.11.0
Release Date: 2026-02-28.
### Runtime
- [fix] fix methodPointer of Full Generic Sharing Method may not be initialized in some cases, which leads to methodPointerCallByInterp not initialized correctly.
- [fix] handle intrinsic System.Array.UnsafeMov specially. It will raise unbox exception if runs this generic method at interpreter mod.
- [fix] adjust data type at stack top after JitHelper::UnsafeCast and JitHelper::UnsafeEnumCastLong.
- [fix] **6000.3.x**: fix bug of comparing MVAR in IsSameOverrideType
## 8.10.0
Release Date: 2026-02-24.
### Runtime
- fix: fix bug of computing interface vtable implement when re-implements interface in child class.
- fix: for arrays whose element type is a value type, `ldelema` no longer performs type-matching checks.
Although this does not strictly follow the ECMA-335 specification, it is consistent with the behavior of Mono and CoreCLR.
- fix: fix bug that didn't handle RuntimeOptionId::MaxInlineableMethodBodySize in RuntimeConfig::GetRuntimeOption and RuntimeConfig::SetRuntimeOption.
- fix: assign FindImageByAssembly result to image in PreJitClass
- fix: use strict bounds in CheckMulOverflow for int32 and uint32
- fix: fix arguments overflow when method argument count > 256 in InvokeDelegateBeginInvoke.
### Editor
- [new]: support BuildTarget GameCoreXboxOne and GameCoreXboxSeries.
## 8.9.0
Release Date: 2026-01-12.
### Runtime
- [fix] **Unity 6.3.x**: fix bug that didn't handle interpreter type in GlobalMetadata::GetNestedTypes
- [fix] **Unity 6.3.x**: fix crash on GlobalMetadata::GetMethodHandleFromMethodInfo because it maybe passed null as methodInfo in setup vtable.
- [fix] **TUANJIE**: fix IL2CPP_ASSERT fail in Class::GetVirtualMethod when klass is generic class and not initialized, at this time klass->vtable_count == 0
- [fix] **TUANJIE**: fix the bug that didn't initialize method->klass->rgctx_data after GenericMetadata::InflateRGCTXMethod
- [change] **TUANJIE**: [merge] merge il2cpp changes from tuanjie 1.6.7 to 1.6.8
## 8.8.0
Release Date: 2025-12-14.
### Runtime
- [new] support 6000.3.x
- [new] add instructions for ldfld and stfld while field offset >= 2^16
- [fix] fix offset overflow issue for ldflda, ldfld, stfld while offset >= 2^16
- [fix] fix bug of comparing array rank
### Editor
- [new] support 6000.3.x
- [fix] fix deprecated warning of `PlayerSettings.GetScriptingBackend(BuildTargetGroup)` in Unity 6000
## 8.7.0
Release Date: 2025-11-03.

View File

@ -1,6 +1,6 @@
{
"name": "com.code-philosophy.hybridclr",
"version": "8.13.0",
"version": "8.7.0",
"displayName": "HybridCLR",
"description": "HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.",
"category": "Scripting",