Search Unity

Question Can't get Text from InputField

Discussion in 'Visual Scripting' started by ivankachaloff, Jan 3, 2022.

  1. ivankachaloff

    ivankachaloff

    Joined:
    Jul 26, 2020
    Posts:
    2
    I'm trying to make quizzes, so I have an InputField (TMP) for a user to add a word. I want to process the input so I use Component GetComponent type Text. But it returns null. What should I change?
    file1.JPG file2.JPG
     
  2. ivankachaloff

    ivankachaloff

    Joined:
    Jul 26, 2020
    Posts:
    2
  3. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Is Text on the InputField (TMP) object? Looks like its on the Text Area/Text object (assuming by the name Text)