[change] AssemblyResolver also resolves `*.dll.bytes` files besides `*.dll`.

main
walon 2025-04-30 15:33:46 +08:00
parent 31be818bb6
commit 52f25bdb2a
2 changed files with 15 additions and 4 deletions

View File

@ -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;

View File

@ -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;
}
}