Inspector Lock Toggle

You know that tiny “Lock” icon at the right top corner of the Inspector tab, right? Then you probably know that it is pretty much impossible to click on it with an average trackpad on an average laptop? Well, I do! So I was very excited when I saw the “EasyShortcutLockInspector” asset in the Asset Store and decided to add the same functionality to the ExtraTools. Here how it is done:

[MenuItem("Extra Tools/Toggle Inspector Lock %l")]
private static void ToggleInspectorLock()
{
    ActiveEditorTracker.sharedTracker.isLocked = !ActiveEditorTracker.sharedTracker.isLocked;
    ActiveEditorTracker.sharedTracker.ForceRebuild();
}

Just copy-paste this method anywhere in your project and use CTRL+L to toggle the lock of the Inspector window! Also, you can download it from the GitHub.

I will be adding some other stuff to the ExtraTools in the future. Let me know if you have something in mind!

Leave a Reply

Your email address will not be published. Required fields are marked *