-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking inputfield in Unity does not open keyboard (and enable the inputfield?) #34
Comments
@rafbanaan I believe this will not work for now and it's not an issue from unity, I am suggesting you use events to show the keyboard and see if input works ok |
Ok, I will give it a try with the events. |
Most Unity games will actually use a native TextField (iOS or Android) since there's better support for copy/paste/etc, and send the result back to Unity. You can do something similar by allowing Unity to trigger a Flutter TextField (with keyboard), and send the resulting input back to Unity to continue your game. That way you don't need to handle any text input in Unity, but handle it all in Flutter! |
So, if I read it correctly it's more common that in my case I convert my start scene with the inputfields and button into a flutter page which sends the results back to Unity? Since I don't see that you can do flutter input textfields on a full screen Unity game? I'm a bit new to the whole flutter / Unity integration :p |
@rafbanaan exactly! You can build your login/registration screen in Flutter, and after authentication you can navigate to a new Flutter page with Unity embedded, and send any authentication details through to Unity so it does not need to render any UI. |
@thomas-stockx Is there any documentation on the postMessage method? How to call it in flutter and how to accept the message in Unity. I can't find an example in the example project. it only shows the use of the resume() and pause() methods. I want to send my data from the inputfield fields and the value of the selected button to Unity, so I can create an account there. |
Got it working, thanks for the help! Might be useful to put that example in the readme? Together with an example for unity to flutter? |
Is there an update on this? My use case requires me to take user input from a unity view in iOS. Do you have a workaround for this ? |
With my Unity game I have a scene where a user can fill in an username and email address. These two last items are inputfields, but I'm having issues with this.
When I click on the inputfields nothing happens. I don't see a cursor in the inputfield and the keyboard doesn't pop up.
When I build it native for android it works.
Any tips or is this a bug? I can't find a solution in Unity especially when the native android build works perfect. I do have a 6 buttons in this scene and those work.. in the sense that I can click them and they activate.
The text was updated successfully, but these errors were encountered: