[fix] 修复遗漏扫描泛型类里的非泛型函数,导致桥接函数缺失的问题

main
walon 2022-09-28 15:35:37 +08:00
parent 62bf4c2847
commit a56f940890
4 changed files with 6 additions and 11 deletions

View File

@ -84,7 +84,6 @@ namespace HybridCLR.Editor
public static IAssemblyResolver CreateBuildTargetAssemblyResolver(UnityEditor.BuildTarget target)
{
List<string> searchPaths = new List<string> { SettingsUtil.GetHotFixDllsOutputDirByTarget(target) };
return new CombinedAssemblyResolver(new PathAssemblyResolver(
SettingsUtil.GetHotFixDllsOutputDirByTarget(target)),
new UnityPluginAssemblyResolver(),

View File

@ -110,10 +110,6 @@ namespace HybridCLR.Editor.MethodBridge
private void WalkType(TypeDef typeDef)
{
_typeDefs.Add(typeDef);
if (typeDef.HasGenericParameters)
{
return;
}
ITypeDefOrRef baseType = typeDef.BaseType;
if (baseType != null && baseType.TryGetGenericInstSig() != null)
{
@ -122,10 +118,7 @@ namespace HybridCLR.Editor.MethodBridge
}
foreach (var method in typeDef.Methods)
{
if (method.HasGenericParameters)
{
continue;
}
// 对于带泛型的参数统率泛型共享为object
_notGenericMethods.Add(method);
}
}

View File

@ -95,7 +95,10 @@ namespace HybridCLR.Editor.MethodBridge
case ElementType.SZArray:
case ElementType.FnPtr:
case ElementType.Object:
case ElementType.Module: return GetNativeIntTypeInfo();
case ElementType.Module:
case ElementType.Var:
case ElementType.MVar:
return GetNativeIntTypeInfo();
case ElementType.TypedByRef: return CreateValueType(type);
case ElementType.ValueType:
{

View File

@ -1,6 +1,6 @@
{
"name": "com.focus-creative-games.hybridclr_unity",
"version": "0.3.2",
"version": "0.3.3",
"displayName": "HybridCLR",
"description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR",
"category": "Runtime",