Ok for the people that just wanted to see what is the Type of the input and the property that contains the value > It is TMP_InputField and the property is inputVariable.text. He shows it at 16:23.
MAN THANK YOU SOOOO MUCH...I tried like 4 tutorials and none of them seemed to work even when I did everything correctly...they just had it too complicated and the tutorials were too old. ily dude
I know this is a bit late for you to answer but may I ask if instead of creating a new gameObject named "NameController", can i just add the script to the parent canvas of the inputfields? This is what I did and it worked.
How can I do mathematical operatins with a number from input field?? I know that the number is string and that it can not be for example devided but I do not know how to do what I want it to do.
I've found it out. If someone needs to know, here is the link: answers.unity.com/questions/933639/how-do-i-addmultiply-input-field-boxes.html The link is for multiplying 2 input fields so you have to figure out how it needs to be writen to multiply number from input field by some number.
Hi, sorry for the late reply. What you need to do is convert that string to an Integer. you can do it like this by using Int32.Parse : public TMP_inputfield f_num; public TMP_inputfield s_num; public void calculate() { int num2 = Int32.Parse(f_num.text); int num2 = int32.Parse(s_num.text); Add(num1, num2); } private int Add(int num1, int num2, int result) { result = num1 + num2; return result; } Hope this helps :D
So you can use Int32.Parse or Convert.ToInt32 the only difference is that Int32.Parse does not allow for a null value and will throw and error. Let me know if you need any more assistance with what you trying to achieve.
@@theultimatedeveloper4736 i will and sorry if i seemed a little stand off'ish i have the same thing working its just not in TMP its regular text and i cant use Playerpref since TMP doesnt like that :( but yes pleasee make a video, if youd like i can show you my way of doing it if i figure it out aswell, up to you :)
@@theultimatedeveloper4736 i dont know how to send a screenshot but plssss can u make how u can get the InputField text to your profil secne?, so! i mean the player tipes his name in the entername secne and then he goes to the lobby and in the lobby ( up - right ) is a button where is Profi and when the player click on it, then it shows the text that he enters in the InputField???? hope that u make a tutorial for this😁
@@theultimatedeveloper4736 so i used another video but its not working with another secne😞😞, i entered a text in the InputField and clicked on 'DONE' and the Done button brings me to the lobby and then i clicked on 'PROFIL' button and the text didnt show😞😞 plsss help me to reach my dream in my game😕😕
Hi Jeeva, Thanks for the feedback. This tutorial is for beginners so I tried to explain almost everything that I did. Yes you right I should of mentioned it was beginners.
Ok for the people that just wanted to see what is the Type of the input and the property that contains the value > It is TMP_InputField and the property is inputVariable.text.
He shows it at 16:23.
Dear thank you very very much , so are best teacher easy , understandable and apreciateable. I am going to subscribe you .
MAN THANK YOU SOOOO MUCH...I tried like 4 tutorials and none of them seemed to work even when I did everything correctly...they just had it too complicated and the tutorials were too old.
ily dude
You are welcome! Thank you
Please consider subscribing for more awesome tutorials.
finally a video who explains this with TMPro!! I've been looking for it for sooo long. Thank you so much Jason!
This is the best tutorial on the subject I've come across, not that there are that many. Thanks, Jason.
Thanks Jason very thorough and the best video for using Input Fields with TextMeshPro
THANK YOU YOU ARE THE BEST
Thank you so much! I needed the linking part because Unity wasn't really trying to work so, thank you so much!
Many thanks for this. :)
Finally something that helps on this topic!
You saved me hours n hours of work!! Thank you very much!!
It is really helpful for devoloper
Thank you
Please consider subscribing for more awesome tutorials.
thankyou luv u bro :)
Thanks for saving me.
Thank you. Your video has helped me a lot.
You are welcome
Don't forget to subscribe :)
I know this is a bit late for you to answer but may I ask if instead of creating a new gameObject named "NameController", can i just add the script to the parent canvas of the inputfields? This is what I did and it worked.
THANK YOU SO MUCH!!
awesome, thanks so much!!
You're welcome!
Please consider subscribing for more awesome tutorials.
Precise and helpful, thanks a lot!
You are welcome, Don't forget to subscribe for more amazing tutorials.
how about different fonts inside the same text area?
Thanks, though the only thing I wanted is this: TMP_InputField ;
How can I do mathematical operatins with a number from input field?? I know that the number is string and that it can not be for example devided but I do not know how to do what I want it to do.
I've found it out. If someone needs to know, here is the link: answers.unity.com/questions/933639/how-do-i-addmultiply-input-field-boxes.html
The link is for multiplying 2 input fields so you have to figure out how it needs to be writen to multiply number from input field by some number.
Hi, sorry for the late reply. What you need to do is convert that string to an Integer. you can do it like this by using Int32.Parse :
public TMP_inputfield f_num;
public TMP_inputfield s_num;
public void calculate()
{
int num2 = Int32.Parse(f_num.text);
int num2 = int32.Parse(s_num.text);
Add(num1, num2);
}
private int Add(int num1, int num2, int result)
{
result = num1 + num2;
return result;
}
Hope this helps :D
So you can use Int32.Parse or Convert.ToInt32 the only difference is that Int32.Parse does not allow for a null value and will throw and error.
Let me know if you need any more assistance with what you trying to achieve.
Please consider subscribing for more awesome tutorials.
thanks!
Good part starts at 6:25
next time you should show how to save it when you exit the game so that when you get back in the name saves
Thank you, I will make a video soon on that. Please consider subscribing and look out for that video soon.
@@theultimatedeveloper4736 i will and sorry if i seemed a little stand off'ish i have the same thing working its just not in TMP its regular text and i cant use Playerpref since TMP doesnt like that :( but yes pleasee make a video, if youd like i can show you my way of doing it if i figure it out aswell, up to you :)
its not working by me it says: Error: The type of name "user_name" Couldnt not be found
Hi Nissyns, Please can you send me a screen shot off your error and I will help you solve it.
@@theultimatedeveloper4736 i dont know how to send a screenshot but plssss can u make how u can get the InputField text to your profil secne?, so! i mean the player tipes his name in the entername secne and then he goes to the lobby and in the lobby ( up - right ) is a button where is Profi and when the player click on it, then it shows the text that he enters in the InputField???? hope that u make a tutorial for this😁
@@theultimatedeveloper4736 so i used another video but its not working with another secne😞😞, i entered a text in the InputField and clicked on 'DONE' and the Done button brings me to the lobby and then i clicked on 'PROFIL' button and the text didnt show😞😞 plsss help me to reach my dream in my game😕😕
@@hyperadoi Hi, Okay I understand what you saying, I will make a video and post shortly, hope it helps.
@@theultimatedeveloper4736 THANK YOUU!! IS SWEAR YOU'RE BETTER THEN BRACKEYS😀😀😀😀
Hello, Name.... is simpler
I guess the title suitable content 2 min but why so long ??? please skip unnecessary or change suitable title 😪
Hi Jeeva, Thanks for the feedback. This tutorial is for beginners so I tried to explain almost everything that I did. Yes you right I should of mentioned it was beginners.
test