Skip to content

Commit

Permalink
[unity]两套API同时放开后,unity的CI会卡在v1版本的执行上
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Dec 18, 2024
1 parent 1e1d1b7 commit d52cbf6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unity/Assets/core/upm/Runtime/Src/Default/Native/PuertsDLL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using System.Runtime.InteropServices;
using System.Text;

#if !PUERTS_IL2CPP_OPTIMIZATION || !ENABLE_IL2CPP

namespace Puerts
{
#pragma warning disable 414
Expand Down Expand Up @@ -645,3 +647,5 @@ public static string GetJSStackTrace(IntPtr isolate)
}
}
}

#endif
16 changes: 16 additions & 0 deletions unity/Assets/core/upm/Runtime/Src/IL2Cpp/Native/NativeAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package.
*/

#if UNITY_2020_1_OR_NEWER
#if PUERTS_IL2CPP_OPTIMIZATION && ENABLE_IL2CPP

using System;
using System.Runtime.InteropServices;
Expand All @@ -14,6 +16,17 @@

namespace Puerts
{
#pragma warning disable 414
public class MonoPInvokeCallbackAttribute : System.Attribute
{
private Type type;
public MonoPInvokeCallbackAttribute(Type t)
{
type = t;
}
}
#pragma warning restore 414

public class NativeAPI
{
#if (UNITY_IPHONE || UNITY_TVOS || UNITY_WEBGL || UNITY_SWITCH) && !UNITY_EDITOR
Expand Down Expand Up @@ -428,3 +441,6 @@ public struct pesapi_ffi
public pesapi_set_env_private_func set_env_private;
}
}

#endif
#endif

0 comments on commit d52cbf6

Please sign in to comment.