Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ShortcutManagerEditor/ConflictResolver.cs prevents overriding of existing shortcuts

Discussion in '2018.3 Beta' started by arvzg, Nov 21, 2018.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    I just upgraded to 2018.3b10 and something called
    ShortcutManagerEditor/ConflictResolver.cs 
    has stopped me from overriding Ctrl+Alt+F (Move to View) behaviour to use my own code.

    Code (CSharp):
    1. Shortcut conflict detected for key binding Ctrl+Alt+F.
    2. Please resolve the conflict by rebinding one or more of the following shortcuts:
    3. GameObject/Move To View 2D (Ctrl+Alt+F)
    4. GameObject/Move To View (Ctrl+Alt+F)
    5. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
    Previously in 2018.2 I had some editor code that adds a new MenuItem with a shortcut:

    Code (CSharp):
    1. [MenuItem("GameObject/Move To View 2D %&f", false, 10)]
    And the priority of 10 must be higher than the priority of the default MoveToView, as this successfully overridden it and called my MoveToView2D code instead.

    But in 2018.3 ConflictResolver.cs seems to have broken this :(

    Any possible solutions?
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,590
    I thought Unity includes a Shortcut Manager Window now, where you can resolve these conflicts. Basically remove the "Move To View" shortcut in your case.

    It should be located in Edit > Shortcuts according to the following video.




    EDIT: It seems to be a 2019.1 feature:
    https://forum.unity.com/threads/preview-of-2019-1-features.576907/
     
  3. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    It's not available in 2018.3 beta yet, only in 2019.1 alpha
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,590
    In this case, I would submit a bug-report, because its a regression imo. They most likely don't back-port the shortcut manager to 2018, thus they should be interested to keep the old functionality intact, where we can override existing shortcuts.
     
  5. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    Yeah I agree, definitely looks like they left the ConflictResolution code in, but took the actual shortcuts editor out. Will submit a report, thanks
     
    Peter77 likes this.
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132