mirror of
https://github.com/focus-creative-games/hybridclr_unity.git
synced 2026-12-01 06:52:37 +08:00
[fix] 修复 externalHotUpdateAssembliyDirs 无法正确工作的bug
This commit is contained in:
@@ -26,29 +26,12 @@ namespace HybridCLR.Editor.Commands
|
||||
|
||||
var ls = SettingsUtil.HybridCLRSettings;
|
||||
|
||||
var allAssByNames = new Dictionary<string, Assembly>();
|
||||
foreach (var ass in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
allAssByNames[ass.GetName().Name] = ass;
|
||||
}
|
||||
|
||||
var hotfixAssembles = new List<Assembly>();
|
||||
foreach(var assName in SettingsUtil.HotUpdateAssemblyNames)
|
||||
{
|
||||
if (allAssByNames.TryGetValue(assName, out var ass))
|
||||
{
|
||||
hotfixAssembles.Add(ass);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"assembly:{assName} 不存在");
|
||||
}
|
||||
}
|
||||
List<string> hotfixAssemblies = SettingsUtil.HotUpdateAssemblyNames;
|
||||
|
||||
var analyzer = new Analyzer(Meta.MetaUtil.CreateBuildTargetAssemblyResolver(EditorUserBuildSettings.activeBuildTarget), HybridCLRSettings.Instance.collectAssetReferenceTypes);
|
||||
var refTypes = analyzer.CollectRefs(hotfixAssembles);
|
||||
var refTypes = analyzer.CollectRefs(hotfixAssemblies);
|
||||
|
||||
Debug.Log($"[LinkGeneratorCommand] hotfix assembly count:{hotfixAssembles.Count}, ref type count:{refTypes.Count} output:{Application.dataPath}/{ls.outputLinkFile}");
|
||||
Debug.Log($"[LinkGeneratorCommand] hotfix assembly count:{hotfixAssemblies.Count}, ref type count:{refTypes.Count} output:{Application.dataPath}/{ls.outputLinkFile}");
|
||||
var linkXmlWriter = new LinkXmlWriter();
|
||||
linkXmlWriter.Write($"{Application.dataPath}/{ls.outputLinkFile}", refTypes);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Reference in New Issue
Block a user