From 52f25bdb2aba0273f3f2f21017d207a5822a551d Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 30 Apr 2025 15:33:46 +0800 Subject: [PATCH] [change] AssemblyResolver also resolves `*.dll.bytes` files besides `*.dll`. --- Editor/Meta/FixedSetAssemblyResolver.cs | 6 ++++++ Editor/Meta/PathAssemblyResolver.cs | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Editor/Meta/FixedSetAssemblyResolver.cs b/Editor/Meta/FixedSetAssemblyResolver.cs index 5bee4e4..8206553 100644 --- a/Editor/Meta/FixedSetAssemblyResolver.cs +++ b/Editor/Meta/FixedSetAssemblyResolver.cs @@ -29,6 +29,12 @@ namespace HybridCLR.Editor.Meta Debug.Log($"[FixedSetAssemblyResolver] resolve:{assemblyName} path:{assemblyPath}"); return true; } + assemblyPath = $"{_rootDir}/{assemblyName}.dll.bytes"; + if (File.Exists(assemblyPath)) + { + Debug.Log($"[FixedSetAssemblyResolver] resolve:{assemblyName} path:{assemblyPath}"); + return true; + } } assemblyPath = null; return false; diff --git a/Editor/Meta/PathAssemblyResolver.cs b/Editor/Meta/PathAssemblyResolver.cs index a356117..1cfc376 100644 --- a/Editor/Meta/PathAssemblyResolver.cs +++ b/Editor/Meta/PathAssemblyResolver.cs @@ -20,11 +20,16 @@ namespace HybridCLR.Editor.Meta { foreach(var path in _searchPaths) { - string assPath = Path.Combine(path, assemblyName + ".dll"); - if (File.Exists(assPath)) + assemblyPath = Path.Combine(path, $"{assemblyName}.dll"); + if (File.Exists(assemblyPath)) { - Debug.Log($"resolve {assemblyName} at {assPath}"); - assemblyPath = assPath; + Debug.Log($"resolve {assemblyName} at {assemblyPath}"); + return true; + } + assemblyPath = Path.Combine(path, $"{assemblyName}.dll.bytes"); + if (File.Exists(assemblyPath)) + { + Debug.Log($"resolve {assemblyName} at {assemblyPath}"); return true; } }