Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

EasyShortcutLockInspector - Unity Editor Inspector option (Lock/Unlock)

Discussion in 'Assets and Asset Store' started by FreCre, Feb 1, 2015.

  1. FreCre

    FreCre

    Joined:
    Nov 27, 2014
    Posts:
    3
    EasyShortcutLockInspector

    easyshortcut.jpg

    A shortcut key to toggle Inspector option unlock/lock.

    Works in all Unity Editor
    This is a great option (lock icon) that doesn't require you to keep moving the mouse at the corner of the screen.

    Easy to use..
    After importing the package EasyShortcutLockInspector;
    Add the script "EasyShortcutLockInspector.cs" on your project Editor(folder).
    Editor / EasyShortcutLockInspector.cs
    Then you can now hit the shortcut keys "CTRL + L or commond + L"

    We believe that everyone loves shortcut keys, so hope it helps.










     
  2. Farresto

    Farresto

    Joined:
    Jan 20, 2016
    Posts:
    9
    Hi! Thanks a lot for the asset. Is there any way to edit the shortcut key? L is a bit too far from LCTRL and I'd like to lock/unlock inspector with my left hand only.
     
  3. dCalle

    dCalle

    Joined:
    Dec 16, 2013
    Posts:
    55
    Doesn't work in 2017.2.0b4
     
  4. sfilo

    sfilo

    Joined:
    Oct 23, 2012
    Posts:
    28
    Hi, doesn't work in 2019 2.21.f1

    Thanks for making this asset!
     
  5. SolidAlloy

    SolidAlloy

    Joined:
    Oct 21, 2019
    Posts:
    58
    You can open Assets/EasyShortCutKeyInspector/EasyShortCutLockInspector.cs and change the hotkey there. By default, it is %l
    You can read how to write hotkeys here: https://docs.unity3d.com/ScriptReference/MenuItem.html
     
  6. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    65
    Can't find it on the asset store , was it removed ?

    Edit : using this :
    Code (CSharp):
    1. bool isLocked = UnityEditor.ActiveEditorTracker.sharedTracker.isLocked;
    2. UnityEditor.ActiveEditorTracker.sharedTracker.isLocked = ! isLocked;
    3. UnityEditor.ActiveEditorTracker.sharedTracker.ForceRebuild();
     
    Last edited: Sep 7, 2022