42 Minutes Ago
Load Harmony mods with CurrentAssemblies on Unity 6.7 and later On CoreCLR, Assembly.Load(byte[]) puts every image it loads into its own anonymous AssemblyLoadContext rather than the one domain Mono has, so 0Harmony and the renamed mod assemblies don't land where the game's own assemblies are. Unity 6.7 adds CurrentAssemblies.LoadFromBytes for this, and GetLoadedAssemblyPath() for the path Unity loaded an assembly from (Assembly.Location is empty for anything loaded from an image). ExceptionReporter's scan for mod frameworks uses GetLoadedAssemblies(). Hand-ported from unity_6.7.0's changeset 169789 (ad48fc1df89, "Use newer LoadFromBytes API for Harmony"). Those APIs don't exist in Unity 6.3, so every change sits behind UNITY_6000_7_OR_NEWER and main's Unity 6.3 build compiles exactly the code it did before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>