Hi all,
I’m upgrading a project from 2.6 to 3.1 and the following code,
var evt : Event = Event.current;
GUI.enabled = loginStatus != LOGIN_PROMPT;
if (GUILayout.Button ("Login") ||
(loginStatus != LOGIN_PROMPT
(evt.type == EventType.KeyUp
(evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter))))
{
// Do login stuff
}
which used to “Do login stuff” no longer triggers when the user presses Enter/Return. loginStatus is a string that’s used to determine if the user has written anything in both the username and password fields and does not appear to be the limiting factor (ie, the GUI Login button is enabled, ∴ the keyboard input should work as well). Does anyone know why that code would work in 2.6 and not 3.x?