Search Unity

Scroll value is always 0 in editor game view, works fine in build

Discussion in 'Linux' started by Tyler-Egeto, Oct 29, 2015.

  1. Tyler-Egeto

    Tyler-Egeto

    Joined:
    Oct 18, 2012
    Posts:
    5
    Hi, I've seen this issue in all releases of the Linux editor. Using the input manager, I have the scroll wheel mapped (screenshot attached) When running the game in editor, the input manager always returns a value of 0. I'm reading it with:
    Code (CSharp):
    1. Input.GetAxis("Zoom")
    If I do a build, and run that, it returns non zero values and works as expected. Is anyone else seeing this?

    I'm running Ubuntu, 15.10, I also saw the issue on 15.04.
     

    Attached Files:

  2. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    There seems to be a problem with the scrollwheel sensitivity in the editor, for me it's half as much as it should be. I have the sensitivity at 0.1 in the input settings, but I'm seeing 0.05 when debugging. In build, it works as it should. Are you sure it's returning 0 and not just less than you'd expect?

    You can use platform dependent compilation and multiply it by two in the editor (won't be included in build):

    Code (CSharp):
    1. #if UNITY_EDITOR
    2.     Input.GetAxis("Zoom") * 2;
    3. #endif
    I use Ubuntu 15.10 as well.
     
  3. Tyler-Egeto

    Tyler-Egeto

    Joined:
    Oct 18, 2012
    Posts:
    5
    Thanks for the reply LukeKotar, it lead me to some more interesting details. Apparently its not 0, if I times the value by 100 I see some values now. I've attached a screen shot of the values when multiplied by 100 for the dev team. I'll use the conditional compilation trick as a work around for now, thanks!

    EDIT: Actually, it is 0. If the game window has focus, it always reports 0 for me. If I click outside the Game window, eg: on some Unity3D UI, giving the editor focus, the game window then receives the scroll values. As soon as the window has focus again, scroll values return to 0.
     

    Attached Files:

    Last edited: Oct 29, 2015
  4. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    Are you using an old editor build? "Allow mouse capture in game view" is listed in the build #2015090301's release notes. You can download the latest build from the bottom of this thread: Unity on Linux: Release Notes and Known Issues
     
    Last edited: Oct 29, 2015