Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Keyboard Input and GUI Buttons not working properly

Discussion in 'Developer Preview Archive' started by sh0v0r, Dec 22, 2011.

  1. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
    My game is a PC stand alone title.

    After importing and converting and attempting to play the game in the editor in maximised mode with a fixed resolution of 1280x720 I have encountered this:

    1: Keyboard input is not registering
    2: GUI mouse positions are offset, the mouse needs to be approximately 100 pixels offset to the right for the button to register it hovering over it.

    There are no errors or warnings...

    I cannot submit this project for a bug report it is too large.
     
    Last edited: Dec 22, 2011
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,087
    There are other things you could do:

    1)Cut down the project so that it is smaller. Or create a simple test project where the issue happens

    2)You can host the project on an ftp or provide svn / vcs information in the bug ticket we can take a look.

    Having access to a reproduction case makes the chances of the bug getting looked at and fixed much higher.
     
  3. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
    I've decided to uninstall it, I imagine it works much better if you're starting a new project and just want to play around with the new features but its not ready for large projects to be converted to it.

    What's the proper process to return to 3.4f2 and be able to open a different project than the one that was converted as the open project dialog does not display?

    - Uninstall Unity (Removes 3.5)
    - Reinstall 3.4f2

    ?
     
  4. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
    The project is too large (2GB) for my internet connection to upload.

    This is my project: www.shovsoft.com/lunarflight
     
  5. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,087
    Yes, that should be adequate.

    If you could provide access to this project to fix the in editor issue it would be very handy. I am not aware of this issue existing in the bug database and if we don't have a case for it it may still exist when we reach 3.5 final.

    :( I remember the quality of Australian internet. My condolences.
     
  6. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    687
    Keyboard input? Really? That's odd, can you share your code please?

    Also, hold Alt when launching Unity to bring up the Project wizard rather than loading the last opened project.
     
  7. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
  8. Asbeel

    Asbeel

    Joined:
    Aug 19, 2011
    Posts:
    4
    Same problem here, I just updated to v3.5 and my keyboard stopped working in runtime.
     
  9. Eldoroth

    Eldoroth

    Joined:
    Feb 29, 2012
    Posts:
    10
    Same here, PC Game working as expected in 3.4.2. Then I installed 3.5, upgraded the project, and keyboard input just vanished.

    Note that I am still able to use shortcuts and type. Keyboard input is only missing in the game view.

    Also, this bug does not only happen in the Editor. I built the .exe and there is no keyboard input either.
     
    Last edited: Feb 29, 2012
  10. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
    I found out what the problem was for me. I had set the registry key DirectInput to true for both the player and the editor. This was done because I had to test an older joystick and it required calibration which is dependant on DirectInput.

    I discovered this from a Kerbal Space Programs forum as one of their players made a mention of my game Lunar Flights registry recommendation. It turns out the in 3.5 this key no longer is supported.

    Once I removed the key everything started to work as expected apart from the massive performance loss under 3.5.
     
  11. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
  12. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
  13. Eldoroth

    Eldoroth

    Joined:
    Feb 29, 2012
    Posts:
    10
    I am currently using direct input because of the joystick I use for testing. At some point I guessed it might have something to do with this bug, and now you've finally confirmed it.

    I'll try removing the reg key and see what happens. I wouldn't like to go back to the point where I couldn't use my testing joystick though.

    I'll share my experience as soon as I can.
     
  14. Radiangames

    Radiangames

    Joined:
    Sep 15, 2011
    Posts:
    16
    I just had the exact same problem on my PC after upgrading to 3.5 today.

    I tried multiple projects, and they all had the same mousePosition offset issue, making it impossible to play the games. Note that this issue is NOT present when building a standalone build, but I don't do that often when developing my games.

    I also have not seen this issue in a month of using 3.5 on the Mac, but it doesn't appear to be possible given the solution (and I've been iOS-focused regardless).

    The solution, as mentioned above, was to visit the thread about DirectInput issues and run the ResetInput.reg file. This is worrisome to me because just a couple months ago I had a few people run the other Registry file specifically to make my games work with their gamepads. Though I'm no longer focused on PC games, it would be ideal if this issue were solved such that mouse, keyboard, and gamepads all work regardless of whether the DirectInput settings were one way or the other (in both Editor and StandAlone builds).

    Cheers,
    Luke Schneider
    Radiangames
     
  15. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283

    Can we please get a response to this from Unity, it's a pretty critical issue particularly since I just released a game on Steam and added this registry setting to the install script. I am still using 3.4.

    What I am worried about is that this will cause issues for people who use any 3.5 Unity applications
     
  16. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    331

    I cannot get any of my controllers to reach "full lock" in either direction in the standalone game or the editor..They are also never centered..... Are you sure that your controllers are using Direct Input on your standalones?

    DX tweak and Windows calibration is showing the Direct Input to be perfect and the RAW Input in DX tweak is off the exact amount that the game is incorrect.

    I also have a few controllers that are very low resolution (256) and the problem is not as noticeable as the high res (1024) stuff i have. THe high res stuff you cannot even get half stroke.........BUMMER.

    Please Unity Help.......:)

    Thanks

    Kevin
     
  17. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    283
    Yes I'm pretty sure, I'm also using 3.4 not 3.5

    Also regarding your mouse offset issue have you seen this post?

    http://forum.unity3d.com/threads/108135-Help-Unity-eliminate-persistent-bugs!