[change] refactor code comments and translate them to English
parent
d5eaa350c5
commit
f58d12c2cb
|
|
@ -6,9 +6,6 @@ using UnityEditorInternal;
|
||||||
namespace HybridCLR.Editor.Settings
|
namespace HybridCLR.Editor.Settings
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 监听编辑器状态,当编辑器重新 focus 时,重新加载实例,避免某些情景下 svn 、git 等外部修改了数据却无法同步的异常。
|
|
||||||
/// </summary>
|
|
||||||
[InitializeOnLoad]
|
[InitializeOnLoad]
|
||||||
public static class EditorStatusWatcher
|
public static class EditorStatusWatcher
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,6 @@ namespace HybridCLR.Editor.Settings
|
||||||
{
|
{
|
||||||
using (CreateSettingsWindowGUIScope())
|
using (CreateSettingsWindowGUIScope())
|
||||||
{
|
{
|
||||||
//解决编辑器打包时出现的 _serializedObject.targetObject 意外销毁的情况
|
|
||||||
if (_serializedObject == null||!_serializedObject.targetObject)
|
if (_serializedObject == null||!_serializedObject.targetObject)
|
||||||
{
|
{
|
||||||
InitGUI();
|
InitGUI();
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,6 @@ namespace HybridCLR.Editor
|
||||||
public string name;
|
public string name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 热更新dll列表。不包含 preserveHotUpdateAssemblies。
|
|
||||||
/// </summary>
|
|
||||||
public static List<string> HotUpdateAssemblyNamesExcludePreserved
|
public static List<string> HotUpdateAssemblyNamesExcludePreserved
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ namespace HybridCLR
|
||||||
{
|
{
|
||||||
public enum HomologousImageMode
|
public enum HomologousImageMode
|
||||||
{
|
{
|
||||||
Consistent, // AOT dll需要跟主工程精确一致,即为裁剪后的AO dll
|
Consistent,
|
||||||
SuperSet, // AOT dll不需要跟主工程精确一致,但必须包含裁剪后的AOT dll的所有元数据,即为裁剪后dll的超集。推荐使用原始aot dll
|
SuperSet,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ namespace HybridCLR
|
||||||
public enum LoadImageErrorCode
|
public enum LoadImageErrorCode
|
||||||
{
|
{
|
||||||
OK = 0,
|
OK = 0,
|
||||||
BAD_IMAGE, // dll 不合法
|
BAD_IMAGE, // invalid dll file
|
||||||
NOT_IMPLEMENT, // 不支持的元数据特性
|
NOT_IMPLEMENT, // not implement feature
|
||||||
AOT_ASSEMBLY_NOT_FIND, // 对应的AOT assembly未找到
|
AOT_ASSEMBLY_NOT_FIND, // AOT assembly not found
|
||||||
HOMOLOGOUS_ONLY_SUPPORT_AOT_ASSEMBLY, // 不能给解释器assembly补充元数据
|
HOMOLOGOUS_ONLY_SUPPORT_AOT_ASSEMBLY, // can not load supplementary metadata assembly for non-AOT assembly
|
||||||
HOMOLOGOUS_ASSEMBLY_HAS_LOADED, // 已经补充过了,不能再次补充
|
HOMOLOGOUS_ASSEMBLY_HAS_LOADED, // can not load supplementary metadata assembly for the same assembly
|
||||||
INVALID_HOMOLOGOUS_MODE, // 非法HomologousImageMode
|
INVALID_HOMOLOGOUS_MODE, // invalid homologous image mode
|
||||||
PDB_BAD_FILE, // pdb文件不合法
|
PDB_BAD_FILE, // invalid pdb file
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace HybridCLR
|
||||||
public static class RuntimeApi
|
public static class RuntimeApi
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载补充元数据assembly
|
/// load supplementary metadata assembly
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dllBytes"></param>
|
/// <param name="dllBytes"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
@ -30,7 +30,7 @@ namespace HybridCLR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小)
|
/// get the maximum number of StackObjects in the interpreter thread stack (size*8 represents the final memory size occupied
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetInterpreterThreadObjectStackSize()
|
public static int GetInterpreterThreadObjectStackSize()
|
||||||
|
|
@ -39,7 +39,7 @@ namespace HybridCLR
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小)
|
/// set the maximum number of StackObjects for the interpreter thread stack (size*8 represents the final memory size occupied)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="size"></param>
|
/// <param name="size"></param>
|
||||||
public static void SetInterpreterThreadObjectStackSize(int size)
|
public static void SetInterpreterThreadObjectStackSize(int size)
|
||||||
|
|
@ -49,7 +49,7 @@ namespace HybridCLR
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小)
|
/// get the number of interpreter thread function frames (sizeof(InterpreterFrame)*size represents the final memory size occupied)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetInterpreterThreadFrameStackSize()
|
public static int GetInterpreterThreadFrameStackSize()
|
||||||
|
|
@ -58,7 +58,7 @@ namespace HybridCLR
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置解释器线程函数帧数量(sizeof(InterpreterFrame)*size 为最终占用的内存大小)
|
/// set the number of interpreter thread function frames (sizeof(InterpreterFrame)*size represents the final memory size occupied)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="size"></param>
|
/// <param name="size"></param>
|
||||||
public static void SetInterpreterThreadFrameStackSize(int size)
|
public static void SetInterpreterThreadFrameStackSize(int size)
|
||||||
|
|
@ -71,6 +71,11 @@ namespace HybridCLR
|
||||||
|
|
||||||
private static readonly Dictionary<RuntimeOptionId, int> s_runtimeOptions = new Dictionary<RuntimeOptionId, int>();
|
private static readonly Dictionary<RuntimeOptionId, int> s_runtimeOptions = new Dictionary<RuntimeOptionId, int>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// set runtime option value
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="optionId"></param>
|
||||||
|
/// <param name="value"></param>
|
||||||
public static void SetRuntimeOption(RuntimeOptionId optionId, int value)
|
public static void SetRuntimeOption(RuntimeOptionId optionId, int value)
|
||||||
{
|
{
|
||||||
s_runtimeOptions[optionId] = value;
|
s_runtimeOptions[optionId] = value;
|
||||||
|
|
@ -80,6 +85,11 @@ namespace HybridCLR
|
||||||
public static extern void SetRuntimeOption(RuntimeOptionId optionId, int value);
|
public static extern void SetRuntimeOption(RuntimeOptionId optionId, int value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// get runtime option value
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="optionId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
public static int GetRuntimeOption(RuntimeOptionId optionId)
|
public static int GetRuntimeOption(RuntimeOptionId optionId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue