From 1d09f7246044edaefdab5ad1185086c5fd560033 Mon Sep 17 00:00:00 2001 From: walon Date: Mon, 3 Jul 2023 22:52:56 +0800 Subject: [PATCH] =?UTF-8?q?[change]=20RuntimeApi::GetInterpreterThreadFram?= =?UTF-8?q?eStackSize=20=E4=B9=8B=E7=B1=BB=E7=9A=84=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=9C=A8Editor=E4=B8=8B=E4=B8=BA=E7=A9=BA=E9=9D=9Eextern?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E9=81=BF=E5=85=8DEditor=E4=B8=8B?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=97=B6=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/RuntimeApi.cs | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/Runtime/RuntimeApi.cs b/Runtime/RuntimeApi.cs index bffc117..315aaec 100644 --- a/Runtime/RuntimeApi.cs +++ b/Runtime/RuntimeApi.cs @@ -42,36 +42,70 @@ namespace HybridCLR /// /// /// +#if UNITY_EDITOR + public static unsafe int LoadMetadataForAOTAssembly(byte* dllBytes, int dllSize, int mode) + { + return 0; + } +#else [DllImport(dllName, EntryPoint = "RuntimeApi_LoadMetadataForAOTAssembly")] public static extern unsafe int LoadMetadataForAOTAssembly(byte* dllBytes, int dllSize, int mode); +#endif /// /// 获取解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小) /// /// +#if UNITY_EDITOR + public static int GetInterpreterThreadObjectStackSize() + { + return 0; + } +#else [DllImport(dllName, EntryPoint = "RuntimeApi_GetInterpreterThreadObjectStackSize")] public static extern int GetInterpreterThreadObjectStackSize(); - +#endif + /// /// 设置解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小) /// /// +#if UNITY_EDITOR + public static void SetInterpreterThreadObjectStackSize(int size) + { + + } + #else [DllImport(dllName, EntryPoint = "RuntimeApi_SetInterpreterThreadObjectStackSize")] public static extern void SetInterpreterThreadObjectStackSize(int size); - +#endif /// /// 获取解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小) /// /// +#if UNITY_EDITOR + public static int GetInterpreterThreadFrameStackSize() + { + return 0; + } +#else [DllImport(dllName, EntryPoint = "RuntimeApi_GetInterpreterThreadFrameStackSize")] public static extern int GetInterpreterThreadFrameStackSize(); - +#endif + /// /// 设置解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小) /// /// +#if UNITY_EDITOR + public static void SetInterpreterThreadFrameStackSize(int size) + { + + } + #else [DllImport(dllName, EntryPoint = "RuntimeApi_SetInterpreterThreadFrameStackSize")] public static extern void SetInterpreterThreadFrameStackSize(int size); +#endif } }