[change] RuntimeApi::GetInterpreterThreadFrameStackSize 之类的函数在Editor下为空非extern函数,避免Editor下调用时出错
parent
058270c658
commit
1d09f72460
|
@ -42,36 +42,70 @@ namespace HybridCLR
|
|||
/// <param name="dllBytes"></param>
|
||||
/// <param name="dllSize"></param>
|
||||
/// <returns></returns>
|
||||
#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
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
#if UNITY_EDITOR
|
||||
public static int GetInterpreterThreadObjectStackSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
[DllImport(dllName, EntryPoint = "RuntimeApi_GetInterpreterThreadObjectStackSize")]
|
||||
public static extern int GetInterpreterThreadObjectStackSize();
|
||||
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 设置解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小)
|
||||
/// </summary>
|
||||
/// <param name="size"></param>
|
||||
#if UNITY_EDITOR
|
||||
public static void SetInterpreterThreadObjectStackSize(int size)
|
||||
{
|
||||
|
||||
}
|
||||
#else
|
||||
[DllImport(dllName, EntryPoint = "RuntimeApi_SetInterpreterThreadObjectStackSize")]
|
||||
public static extern void SetInterpreterThreadObjectStackSize(int size);
|
||||
|
||||
#endif
|
||||
/// <summary>
|
||||
/// 获取解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
#if UNITY_EDITOR
|
||||
public static int GetInterpreterThreadFrameStackSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
[DllImport(dllName, EntryPoint = "RuntimeApi_GetInterpreterThreadFrameStackSize")]
|
||||
public static extern int GetInterpreterThreadFrameStackSize();
|
||||
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 设置解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小)
|
||||
/// </summary>
|
||||
/// <param name="size"></param>
|
||||
#if UNITY_EDITOR
|
||||
public static void SetInterpreterThreadFrameStackSize(int size)
|
||||
{
|
||||
|
||||
}
|
||||
#else
|
||||
[DllImport(dllName, EntryPoint = "RuntimeApi_SetInterpreterThreadFrameStackSize")]
|
||||
public static extern void SetInterpreterThreadFrameStackSize(int size);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue