Reputation: 2711
In Unity3D, how do I detect whether or not the return or done key of the TouchScreenKeyboard
has been pressed?
I have tried Input.GetKeyDown(KeyCode.Return)
, but that doesn't seem to work.
I'm working on iOS and with the native iOS keyboard.
Upvotes: 2
Views: 1538
Reputation: 444
You can send message to Unity by using UnitySendMessage i.e. by calling it in your native textFieldShouldReturn:(UITextField *)textField
method. It may seem unnecessary or burden, but if the other regular way (checking on Unity) does not work, it is the least i can offer.
Upvotes: 1