compile lock

This commit is contained in:
naninunenoy 2020-10-07 02:04:35 +09:00
parent 061107f6f6
commit 7c7c43d064
6 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c47a6f9d38650bb44bdb1b6b74296e85
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9ed3f50ff47b69749a094043f3dcd4f8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
{
"name": "AsmdefHelper.CompileLocker.Editor",
"references": [
"GUID:211243abc45174c45b3a6c275ea126b9"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2707709625a3b9144b2a94ff32287781
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using UnityEngine;
using UnityEditor;
/// <summary>
/// original from: https://gist.github.com/decoc/bde047ac7ad8c9bfce7eb408f2712424
/// 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 {
[MenuItem("Window/Asmdef Helper/Compile Lock", false, 1)]
static void Lock() {
var menuPath = "Window/Asmdef Helper/Compile 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);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 283e87eb30e41c0469f52bd068dbb487
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: