Search Unity

Bug TMP Input Field "No Monobehaviour Scripts"

Discussion in 'UGUI & TextMesh Pro' started by SrFatTabby86, Jan 30, 2024.

  1. SrFatTabby86

    SrFatTabby86

    Joined:
    Jul 4, 2022
    Posts:
    8
    I'm currently unable to use TMP Input Field, it will work fine until I start a build, and then all the input fields in my project will be unselectable.
    When I view the input field script in Packages, I'm met with this error:
    upload_2024-1-29_22-48-13.png
    I tried uninstalling and re-installing, no luck. I'm also using Unity 2022.3.18f1.
    Any ideas on how to use TMP Input Field again?
     

    Attached Files:

    SecretBox and AShim-3D like this.
  2. SecretBox

    SecretBox

    Joined:
    May 18, 2015
    Posts:
    16
    Same issue. I recently updated to TextMeshPro 3.0.7
     
  3. SecretBox

    SecretBox

    Joined:
    May 18, 2015
    Posts:
    16
    Found a fix.
    I had to remove the TMP Input script on the scene object.
    Then add a TMP_Scrollable Input Field (Script) to the scene object.
    Then wire up the Text Viewport, Text Component, Placeholder Etc...
     
  4. SrFatTabby86

    SrFatTabby86

    Joined:
    Jul 4, 2022
    Posts:
    8
    Is TMP_Scrollable Input Field part of the TMP Essentials package?
    Because that's not fully installing for me, at least I think.
     
  5. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
    upload_2024-3-20_16-21-45.png upload_2024-3-20_16-21-58.png

    I think I'm having the same thing. TMP_InputField is not showing up in the Add Component dropdown.
    It IS however present in the hierarchy context menu:
    upload_2024-3-20_16-24-5.png

    But when I save it, it looks like this in the prefab:
    upload_2024-3-20_16-24-36.png

    while other Components look like this: upload_2024-3-20_16-25-8.png

    It looks like Unity isn't finding the class somehow?
     
  6. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
    After loading a freshly created & saved one:
    upload_2024-3-20_16-26-28.png

    After loading a previously existing one (with the correct script reference):
    upload_2024-3-20_16-26-53.png

    Re-importing the TMP Essentials didn't work.
    Even importing the TMP Examples & Extras didn't help.
     
    Last edited: Mar 20, 2024
  7. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
    [Nope]
    ~I fixed *my issue* by throwing away the TextMeshPro directory on the HDD, then letting Unity import again, then import TMP Essentials again.~

    ~I have no clue what was wrong and spent about 4 hours trying to fix it (first by trying to replace the input fields... which is time consuming because you manually need to copy the components for like 5 objects each time)~


    upload_2024-3-20_16-48-43.png

    Scratch that, after a reload the error is back.
     
    Last edited: Mar 20, 2024
  8. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
    Actual solution:
    Delete your project's /Library/ folder!
    I wasted too much time before trying this.
     
    Bruno_Vasa_Creative likes this.
  9. Bruno_Vasa_Creative

    Bruno_Vasa_Creative

    Joined:
    Nov 8, 2023
    Posts:
    6
    This solved my problem. Thank you!