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 } }