[change] changed from throw exception to logError when not supported pinvoke or reverse pinvoke method parameter type was found

main
walon 2025-06-06 16:57:53 +08:00
parent 56486b8a76
commit c9ff293dfe
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ namespace HybridCLR.Editor.MethodBridge
} }
if (!MetaUtil.IsSupportedPInvokeMethodSignature(method.MethodSig)) if (!MetaUtil.IsSupportedPInvokeMethodSignature(method.MethodSig))
{ {
throw new Exception($"MonoPInvokeCallback method {method.FullName} has unsupported parameter or return type. Please check the method signature."); Debug.LogError($"MonoPInvokeCallback method {method.FullName} has unsupported parameter or return type. Please check the method signature.");
} }
//foreach (var ca in method.CustomAttributes) //foreach (var ca in method.CustomAttributes)
//{ //{

View File

@ -38,7 +38,7 @@ namespace HybridCLR.Editor.MethodBridge
{ {
if (!MetaUtil.IsSupportedPInvokeMethodSignature(method.MethodSig)) if (!MetaUtil.IsSupportedPInvokeMethodSignature(method.MethodSig))
{ {
throw new Exception($"PInvoke method {method.FullName} has unsupported parameter or return type. Please check the method signature."); Debug.LogError($"PInvoke method {method.FullName} has unsupported parameter or return type. Please check the method signature.");
} }
_pinvokeMethodSignatures.Add(new CallNativeMethodSignatureInfo { MethodSig = method.MethodSig }); _pinvokeMethodSignatures.Add(new CallNativeMethodSignatureInfo { MethodSig = method.MethodSig });
} }