- Home /
Submit axis not being detected.
Hello,
I want the player to type in a TextField a password and when he thinks it's right he can press the 'return' button which is the Submit axis in my inputs but unity doesn't seem to detect when he does.
Submit axis:![alt text][1]
Code:
if (true)
{
if (CrossPlatformInputManager.GetAxis("Submit") > 0)
{
print("checked answer");
CheckAnswer();
}
if (Input.GetAxisRaw("Cancel") != 0)
{
print("canceled");
LeaveKeyboard();
}
GUI.SetNextControlName("textField");
enteredPassword = GUI.TextField(new Rect(0, 0, 0, 0), enteredPassword, passwordLength);
GUI.FocusControl("textField");
monitor.text = enteredPassword;
}
I have a theory that this may be caused by that the focus is being on the TextField (?).
Thanks in advance, Ethan [1]: /storage/temp/84844-1.png
1.png
(13.3 kB)
Comment
Your answer
Follow this Question
Related Questions
transform.position.y and x or z + 1? 0 Answers
Vector3 and AddRelativeTorque 1 Answer
How to make the npc face the player. 2 Answers
Lerping back and forth like a swipe page effect 0 Answers
Quaternion.Slerp on local axis 1 Answer