Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 2017.4.2 seems to let Alt/Control through to the Editor while playing

Discussion in 'Editor & General Support' started by gumboots, May 24, 2018.

  1. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Hi all,

    As the subject says, I have some commands in my game using Alt/Control + another key. Previously this worked fine, however now I am not receiving the subsequent key as it appears Alt/Control is take by the Editor instead

    Has anyone else experienced this?

    Thanks!
     
  2. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    It just means you'll have to build the game to test the effect of those key combos.
    Or add a conditional in code so that different keys are monitored in editor and in build.
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.         //use different keys
    3. #else
    4.         //use Alt/Control + another key.
    5. #endif
     
  3. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Thanks for the response. I can find a way around it like you suggest, but this hasn't always been the case and doesn't seem like it should be the case?
     
  4. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    Until hotkey signals got intercepted by editor.
    If you think so, please file a bug report. I'm sure some Unity dev will be able to tell you why decision to completely intercept some hotkey signals was made.
    Maybe it IS just a bug, but it doesn't matter that much since you have a workaround now.
     
  5. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    After restarting, it seems to be behaving how it did previously. Quite interesting.