Skip to content

Commit 52f25bd

Browse files
committed
[change] AssemblyResolver also resolves *.dll.bytes files besides *.dll.
1 parent 31be818 commit 52f25bd

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

Editor/Meta/FixedSetAssemblyResolver.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ protected override bool TryResolveAssembly(string assemblyName, out string assem
2929
Debug.Log($"[FixedSetAssemblyResolver] resolve:{assemblyName} path:{assemblyPath}");
3030
return true;
3131
}
32+
assemblyPath = $"{_rootDir}/{assemblyName}.dll.bytes";
33+
if (File.Exists(assemblyPath))
34+
{
35+
Debug.Log($"[FixedSetAssemblyResolver] resolve:{assemblyName} path:{assemblyPath}");
36+
return true;
37+
}
3238
}
3339
assemblyPath = null;
3440
return false;

Editor/Meta/PathAssemblyResolver.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ protected override bool TryResolveAssembly(string assemblyName, out string assem
2020
{
2121
foreach(var path in _searchPaths)
2222
{
23-
string assPath = Path.Combine(path, assemblyName + ".dll");
24-
if (File.Exists(assPath))
23+
assemblyPath = Path.Combine(path, $"{assemblyName}.dll");
24+
if (File.Exists(assemblyPath))
2525
{
26-
Debug.Log($"resolve {assemblyName} at {assPath}");
27-
assemblyPath = assPath;
26+
Debug.Log($"resolve {assemblyName} at {assemblyPath}");
27+
return true;
28+
}
29+
assemblyPath = Path.Combine(path, $"{assemblyName}.dll.bytes");
30+
if (File.Exists(assemblyPath))
31+
{
32+
Debug.Log($"resolve {assemblyName} at {assemblyPath}");
2833
return true;
2934
}
3035
}

0 commit comments

Comments
 (0)