How to Get User Input and Validate It Using Unity
Вставка
- Опубліковано 5 чер 2023
- How to Get User Input and Validate It Using Unity
Greetings, today we shall be looking at how to get user input using a textbox. We then click a button to call a validation method to validate the data in the textbox. We then print the result of the validation to the screen by changing the text of a textfield. We will also change the colour of the text.
We use C# in this Unity tutorial.
Thanks for watching this Unity tutorial on how to get user input and validating it using C#.
Subscribe to keep notified when I upload: tinyurl.com/SubMaxODidily
How to Get User Input and Validate It Using Unity
What a brilliant tutorial, not only was it energetic but very informative as well, well done!
This is great! How would you script the input to have a specific phrase or answer instead of a length?
i would also like to know
I figured it out. Use this:
if(input.Equals("Test"))
{
resultText.text = "Valid input.";
resultText.color = Color.white;
}
hey how to validate if a user input is using @gmail and not any other email?
Dunno
I'm doing everything like you, but I can't see those objects in game mode x_x
Maybe the Layer you chose is behind the background or smth like that