From c9ff293dfeb32852f9511e2d27f52f289fce39c0 Mon Sep 17 00:00:00 2001 From: walon Date: Fri, 6 Jun 2025 16:57:53 +0800 Subject: [PATCH] [change] changed from throw exception to logError when not supported pinvoke or reverse pinvoke method parameter type was found --- Editor/MethodBridge/MonoPInvokeCallbackAnalyzer.cs | 2 +- Editor/MethodBridge/PInvokeAnalyzer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/MethodBridge/MonoPInvokeCallbackAnalyzer.cs b/Editor/MethodBridge/MonoPInvokeCallbackAnalyzer.cs index cfc56e6..917c2a1 100644 --- a/Editor/MethodBridge/MonoPInvokeCallbackAnalyzer.cs +++ b/Editor/MethodBridge/MonoPInvokeCallbackAnalyzer.cs @@ -55,7 +55,7 @@ namespace HybridCLR.Editor.MethodBridge } 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) //{ diff --git a/Editor/MethodBridge/PInvokeAnalyzer.cs b/Editor/MethodBridge/PInvokeAnalyzer.cs index 1729b82..1ddbd3e 100644 --- a/Editor/MethodBridge/PInvokeAnalyzer.cs +++ b/Editor/MethodBridge/PInvokeAnalyzer.cs @@ -38,7 +38,7 @@ namespace HybridCLR.Editor.MethodBridge { 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 }); }