{ How to get text from INPUT FIELD in Unity } - User Text Entries

preview_player
Показать описание
In this video I show how to create an Input Field that allows the user to enter a text to the game or application. We also see how to receive that text input in a script and store it in a variable, this allows us to use the data later.

This can be useful to ask the user for a name to create a profile, a name for a save file or to configure parameters of our game at run time.

____________________________________________________________
*LINKS*

____________________________________________________________

#EN
Рекомендации по теме
Комментарии
Автор

To those who are saying that it's not working- when selecting ReadStringInput in the Input Field, make sure its dynamic and not static (there should be two sections).

greendragonpng
Автор

Fast and to the point 👌 gotta love a well rehearsed and spoken video

AlexiHusky
Автор

Thanks a lot! Your video helped immensely where the Unity Docs did not, particularly for the difference between the OnValueChanged and OnEndEdit events, and their ties (or not) to scripts!. And the comment by @Lorenzo Bergamini and your reply (about making sure to use the upper elements of the list that are Dynamic, which you stated at 2:23, but which I also missed when initially watching the video. Doh!) was spot on! Well done!

turkeyjerkey
Автор

Thanks, finally. I searched for a lot long useless things but finally found that

ano
Автор

DUDE, LOVE YOU, FAST AND TO THE POINT, FINALLY. THANKS

rogpigamedev
Автор

Excellent video! I struggled to understand how to compare 2 fields (Password and Confirm Password) text string fields, and this tutorial got me exactly where I needed to be.

THANK YOU!

politbureau
Автор

Thanks ! Unity is my nightmare. Too complicated too learn.

dragonbleu
Автор

Thats exactly what i needed thank you!

ПавелВорожцов-тэ
Автор

Thank you for simple and instructive video.

dogukanalkan
Автор

Thank you so much for making this tutorial!!

elainechen
Автор

My problem is if i use input field for entering in messages for a chat, the text goes outside of the background input field and I have moved the text and it doesn't resolve the issue.

talismanskulls
Автор

Nice explanation, but it doesn't work form me :( A text box appears in the inspector (in the OnEndEdit box) and in the console is shown what I write in the inspector, instead of what a I wirte in the InputField. Do you know why?

lorenzobergamini
Автор

If it dosen't work and there is another input area in the OnEndEdit box make sure you chose the function under dianamic(Sorry forgot the spelling)

codewithcola
Автор

i have a problem, this worked for me but after i tweaked some stuff it suddenly didnt work and i dont know why. When i type into the input, the debug log will slow empty, but there is stuff in my input when i go back. that means the string isnt working right? something wrong with my ReadStringInput? but idk why it worked before then stopped, its same as ur code

xsomili
Автор

Thanks so much. This was really helpful.
Is there a way to clear the input field after ?

benjwano
Автор

Dude great vid thanks... btw, why is bedroom voıice for :D

stratocasting
Автор

¡Hi GameDevTraum!
When I finished watching your video, a question arose in me. Which functions the input field controls when an area of text is highlighted, for example to bold part of a dialog?

zonagamer
Автор

how would i use their text in a if statement?

saridos
Автор

this only works if you have 1 input, what if you have multiple inputs and want to reuse the ReadStringInput functions? how does the code know which input to update?

Rollbaa
Автор

Great video, thank you so much! I am trying to make a search tab in unity, where once I type something in the input field it checks it against my objects (courses in my case) and if there is a specific course with the name in my scene, then it will print it. How should I go about this?

aanandisidharth