namespace

This commit is contained in:
naninunenoy 2020-10-09 01:25:05 +09:00
parent 686e82ac39
commit b15998bb09

View File

@ -6,19 +6,22 @@ using UnityEditor;
/// This editor utility can lock/unlock unity script compile from menu item.
/// See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile
/// </summary>
public static class CompileLocker {
const string menuPath = "Window/Asmdef Helper/Compile Lock";
[MenuItem("Window/Asmdef Helper/Compile Lock", false, 1)]
static void Lock() {
var isLocked = Menu.GetChecked(menuPath);
if (isLocked) {
Debug.Log("Compile Unlocked");
EditorApplication.UnlockReloadAssemblies();
Menu.SetChecked(menuPath, false);
} else {
Debug.Log("Compile Locked");
EditorApplication.LockReloadAssemblies();
Menu.SetChecked(menuPath, true);
namespace AsmdefHelper.CompileLocker.Editor {
public static class CompileLocker {
const string menuPath = "Window/Asmdef Helper/Compile Lock";
[MenuItem("Window/Asmdef Helper/Compile Lock", false, 1)]
static void Lock() {
var isLocked = Menu.GetChecked(menuPath);
if (isLocked) {
Debug.Log("Compile Unlocked");
EditorApplication.UnlockReloadAssemblies();
Menu.SetChecked(menuPath, false);
} else {
Debug.Log("Compile Locked");
EditorApplication.LockReloadAssemblies();
Menu.SetChecked(menuPath, true);
}
}
}
}