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

КОМЕНТАРІ • 8

  • @AlexBlongX
    @AlexBlongX 2 місяці тому

    What a brilliant tutorial, not only was it energetic but very informative as well, well done!

  • @jontimestwo3749
    @jontimestwo3749 5 місяців тому

    This is great! How would you script the input to have a specific phrase or answer instead of a length?

    • @Danik3673
      @Danik3673 3 місяці тому

      i would also like to know

    • @Danik3673
      @Danik3673 3 місяці тому

      I figured it out. Use this:
      if(input.Equals("Test"))
      {
      resultText.text = "Valid input.";
      resultText.color = Color.white;
      }

  • @aoyukialquen2835
    @aoyukialquen2835 4 місяці тому

    hey how to validate if a user input is using @gmail and not any other email?

  • @parchinbales9211
    @parchinbales9211 11 місяців тому

    I'm doing everything like you, but I can't see those objects in game mode x_x

    • @queenb3730
      @queenb3730 7 місяців тому

      Maybe the Layer you chose is behind the background or smth like that