【m】修改一键打包

This commit is contained in:
2025-05-30 17:00:07 +08:00
parent cd1b718e85
commit 1f19ba2d38
5 changed files with 228 additions and 163 deletions

View File

@@ -8,7 +8,7 @@ namespace Stary.Evo.Editor
/// </summary>
public class LeakDetectionMode
{
[MenuItem("Jobs/内存泄漏检测/显示当前模式")]
[MenuItem("Evo/内存泄漏检测/显示当前模式")]
static void ShowLeakDetection()
{
string message = string.Format("当前模式: {0}", NativeLeakDetection.Mode.ToString());
@@ -16,40 +16,40 @@ namespace Stary.Evo.Editor
}
[MenuItem("Jobs/内存泄漏检测/禁用")]
[MenuItem("Evo/内存泄漏检测/禁用")]
static void LeakDetectionDisable()
{
NativeLeakDetection.Mode = NativeLeakDetectionMode.Disabled;
}
// 验证方法会在正式方法前执行,通不过就会置灰
[MenuItem("Jobs/内存泄漏检测/禁用", true)]
[MenuItem("Evo/内存泄漏检测/禁用", true)]
static bool ValidateLeakDetectionDisable()
{
return NativeLeakDetection.Mode != NativeLeakDetectionMode.Disabled;
}
[MenuItem("Jobs/内存泄漏检测/启用")]
[MenuItem("Evo/内存泄漏检测/启用")]
static void LeakDetectionEnabled()
{
NativeLeakDetection.Mode = NativeLeakDetectionMode.Enabled;
}
[MenuItem("Jobs/内存泄漏检测/启用", true)]
[MenuItem("Evo/内存泄漏检测/启用", true)]
static bool ValidateLeakDetectionEnabled()
{
return NativeLeakDetection.Mode != NativeLeakDetectionMode.Enabled;
}
[MenuItem("Jobs/内存泄漏检测/启用堆栈跟踪")]
[MenuItem("Evo/内存泄漏检测/启用堆栈跟踪")]
static void LeakDetectionEnabledWithStackTrace()
{
NativeLeakDetection.Mode = NativeLeakDetectionMode.EnabledWithStackTrace;
}
[MenuItem("Jobs/内存泄漏检测/启用堆栈跟踪", true)]
[MenuItem("Evo/内存泄漏检测/启用堆栈跟踪", true)]
static bool ValidateLeakDetectionEnabledWithStackTrace()
{
return NativeLeakDetection.Mode != NativeLeakDetectionMode.EnabledWithStackTrace;