[fix] 修复遗漏扫描泛型类里的非泛型函数,导致桥接函数缺失的问题
parent
62bf4c2847
commit
a56f940890
|
@ -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(),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue