Revert "8.2版本上传"

This reverts commit 6a881f2e8a.
This commit is contained in:
2025-06-18 17:37:53 +08:00
parent 7fe716baab
commit e9af7221de
261 changed files with 1340 additions and 9065 deletions

View File

@@ -7,7 +7,6 @@ using System.Threading.Tasks;
using dnlib.DotNet;
using HybridCLR.Editor.Meta;
using UnityEditor;
using UnityEngine;
using IAssemblyResolver = HybridCLR.Editor.Meta.IAssemblyResolver;
namespace HybridCLR.Editor.Link
@@ -23,27 +22,26 @@ namespace HybridCLR.Editor.Link
public HashSet<TypeRef> CollectRefs(List<string> rootAssemblies)
{
var assCollector = new AssemblyCache(_resolver);
var rootAssemblyNames = new HashSet<string>(rootAssemblies);
var typeRefs = new HashSet<TypeRef>(TypeEqualityComparer.Instance);
foreach (var rootAss in rootAssemblies)
using (var assCollector = new AssemblyCache(_resolver))
{
var dnAss = assCollector.LoadModule(rootAss, false);
foreach (var type in dnAss.GetTypeRefs())
var rootAssemblyNames = new HashSet<string>(rootAssemblies);
var typeRefs = new HashSet<TypeRef>(TypeEqualityComparer.Instance);
foreach (var rootAss in rootAssemblies)
{
if (type.DefinitionAssembly == null)
var dnAss = assCollector.LoadModule(rootAss, false);
foreach (var type in dnAss.GetTypeRefs())
{
Debug.LogWarning($"assembly:{dnAss.Name} TypeRef {type.FullName} has no DefinitionAssembly");
continue;
}
if (!rootAssemblyNames.Contains(type.DefinitionAssembly.Name.ToString()))
{
typeRefs.Add(type);
if (!rootAssemblyNames.Contains(type.DefinitionAssembly.Name.ToString()))
{
typeRefs.Add(type);
}
}
}
assCollector.Dispose();
return typeRefs;
}
return typeRefs;
}
}
}