@@ -31,7 +31,7 @@ public static void CleanIl2CppBuildCache()
3131 Directory . Delete ( il2cppBuildCachePath , true ) ;
3232 }
3333
34- private static void GenerateMethodBridgeCppFile ( IReadOnlyCollection < GenericMethod > genericMethods , List < RawReversePInvokeMethodInfo > reversePInvokeMethods , IReadOnlyCollection < RawCalliMethodSignatureInfo > calliMethodSignatures , string tempFile , string outputFile )
34+ private static void GenerateMethodBridgeCppFile ( IReadOnlyCollection < GenericMethod > genericMethods , List < RawReversePInvokeMethodInfo > reversePInvokeMethods , IReadOnlyCollection < CallNativeMethodSignatureInfo > calliMethodSignatures , string tempFile , string outputFile )
3535 {
3636 string templateCode = File . ReadAllText ( tempFile , Encoding . UTF8 ) ;
3737 var g = new Generator ( new Generator . Options ( )
@@ -83,11 +83,15 @@ public static void GenerateMethodBridgeAndReversePInvokeWrapper(BuildTarget targ
8383
8484 var calliAnalyzer = new CalliAnalyzer ( cache , hotUpdateDlls ) ;
8585 calliAnalyzer . Run ( ) ;
86+ var pinvokeAnalyzer = new PInvokeAnalyzer ( cache , hotUpdateDlls ) ;
87+ pinvokeAnalyzer . Run ( ) ;
88+ var callPInvokeMethodSignatures = pinvokeAnalyzer . PInvokeMethodSignatures ;
8689
8790 string templateFile = $ "{ SettingsUtil . TemplatePathInPackage } /MethodBridge.cpp.tpl";
8891 string outputFile = $ "{ SettingsUtil . GeneratedCppDir } /MethodBridge.cpp";
8992
90- GenerateMethodBridgeCppFile ( methodBridgeAnalyzer . GenericMethods , reversePInvokeAnalyzer . ReversePInvokeMethods , calliAnalyzer . CalliMethodSignatures , templateFile , outputFile ) ;
93+ var callNativeMethodSignatures = calliAnalyzer . CalliMethodSignatures . Concat ( pinvokeAnalyzer . PInvokeMethodSignatures ) . ToList ( ) ;
94+ GenerateMethodBridgeCppFile ( methodBridgeAnalyzer . GenericMethods , reversePInvokeAnalyzer . ReversePInvokeMethods , callNativeMethodSignatures , templateFile , outputFile ) ;
9195
9296 CleanIl2CppBuildCache ( ) ;
9397 }
0 commit comments