Skip to content

Commit 4ff12d4

Browse files
committed
il2cpp不需要用到的pinvoke声明在il2cpp环境禁用
1 parent 51966c6 commit 4ff12d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unity/Assets/core/upm/Runtime/Src/IL2Cpp/Native/NativeAPI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ public static void SetLogCallback(LogCallback log, LogCallback logWarning, LogCa
174174
#endif
175175
#endif
176176

177+
#if !ENABLE_IL2CPP
177178
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
178179
public static extern IntPtr pesapi_create_null(IntPtr apis, IntPtr env);
179180

@@ -415,6 +416,7 @@ public static void SetLogCallback(LogCallback log, LogCallback logWarning, LogCa
415416

416417
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
417418
public static extern void pesapi_set_env_private(IntPtr apis, IntPtr env, IntPtr ptr);
419+
#endif
418420
}
419421

420422
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || PUERTS_GENERAL || (UNITY_WSA && !UNITY_EDITOR)

0 commit comments

Comments
 (0)