Text Input doesn't stick in mobile

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Raelyr
Posts: 19
Joined: Sat Aug 12, 2017 11:47 am

Text Input doesn't stick in mobile

Post by Raelyr »

Hey, I use a text input field from dialogue system to let players set their name in my game. In PC it works fine, but when I build for Android, it pops up, lets you alter the text, and press OK, but then it doesn't actually save the PlayerName variable. Any reason the two would be different? I have a vague suspicion that it's something to do with controls (ie pressing enter on keyboard is handled differently than tapping OK on Android)? Thanks in advance!
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: Text Input doesn't stick in mobile

Post by Tony Li »

Hi,

I think you're right. Configure the InputField's OnEndEdit(string) event to call the Text Field UI's StandardUIInputField.AcceptTextInput method.
Raelyr
Posts: 19
Joined: Sat Aug 12, 2017 11:47 am

Re: Text Input doesn't stick in mobile

Post by Raelyr »

Thanks, that worked perfectly!
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: Text Input doesn't stick in mobile

Post by Tony Li »

Glad to help!
Post Reply