I’ve recently been testing my game on Linux and noticed that Input.GetButtonDown(“Submit”) button on the new UI seemed to be true every frame that the button was held.
To test further, I created a new project with one scene and the following script:
using UnityEngine;
public class TestInput : MonoBehaviour
{
int mCount = 0;
void Update()
{
if (Input.GetButtonDown("Submit"))
{
mCount++;
}
}
void OnGUI()
{
GUILayout.Label("Count: " + mCount.ToString());
}
}
I built for linux and tested on Lubuntu 14.10 and Ubuntu 14.04 (both fully updated) with the same result - GetButtonDown is functioning like GetButton.
This is using a controller/joystick to test. I have tried two - a generic HID and an Xbox 360 controller. Pressing Enter on the keyboard works as expected (only triggers once per press). I have tried the jstest utility in Linux and it reports down events only once as you would expect.
In the editor and build for Windows it functions normally (with the same controllers).
I am using Unity 4.6.0f3.