Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    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:
    268
    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,208
    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:
    268
    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,208
    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:
    268
    After restarting, it seems to be behaving how it did previously. Quite interesting.