an focussed GUI.TextField eats Input.GetButton results !?

Hi,

when the user sets the focus onto a GUI.TextField all Input.GetButton(“test-button”) commands deliver false, even when the button is pressed.

Can you help me please? How do I prevent that behavior?

All the best,
Klaus

In what platform is this happening? Please provide the reproduction steps to test this behaviour.

Thank you very much for your reply.

This is happening on Windows and Mac OSX and with Unity 4.2.2f1 Editor and build and also with Unity 4.6.0b9
It doesn’t matter if I get the button state by Input.GetAxis or Input.GetButton.

tempStrg = GUI.TextField (new Rect(10,10,34,20),tempStrg,3);
GUI.Label (new Rect(10,30,200,20),"Button: "+Input.GetAxis(“test-button”).ToString(“f1”));

When you click into the text field, the button state goes from on (1.0) to off (0.0). And when you unfocus the test field, the button state doesn’t return to on. Even when you switch off the button and then switch it on again. Then the button is shown as on.

All the best,
Klaus

In this case please create a minimal project showing the problem, and submit it with a bug report:

http://blogs.unity3d.com/2009/04/15/bug-reporting-and-you/

Hi,

thank you very much for your quick reply. I made the sample project and reported it as bug. It has the number 609388.

All the best,
Klaus