Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[SOLVED] TextMesh Pro - Text not showing after re-opening Unity

Discussion in 'UGUI & TextMesh Pro' started by sschimper, Nov 1, 2019.

  1. sschimper

    sschimper

    Joined:
    Jul 16, 2019
    Posts:
    4
    Hi everyone,

    this is my first thread in this forum. I have the following issue with TextMesh Pro (I tried googling a solution but haven't found anything related to this, so please forgive me if a similar thread already exists):

    I am using TextMesh Pro in Unity Version 2019.2.10f1, mainly for button descriptions. (For example I created a simple UI dialogue, displaying a message and two buttons for "Quit" and "Cancel"). Everytime I close Unity and re-open it, the texts are missing. The same happens if I start Play mode and exit it afterwards. The game object is still there in the hierarchy view and in the inspector where the TextMesh Pro script should be displayed I have a warning saying "The associated script can not be loaded. Please fix any compile errors and assign a valid script." I don't have any compile errors, just some warnings about the missing script.

    I don't see what's going on and couldn't find a solution on Google (yet). I should point out that I am just starting my GameDev journey and that I am relatively unexperienced. Therefore any help is highly appreciated.

    Thank you very much in advance!

    Cheers
    Sebastian

    Screenshot (70).png
    Hierachy.jpg
    missingScript.jpg
    console.jpg
     
  2. James15478

    James15478

    Joined:
    Apr 2, 2013
    Posts:
    91
    Try to find the scripts that were supposed to be attached to the game object in the project view. Right click them, and reimport (just those, not all). That may solve it.
     
  3. sschimper

    sschimper

    Joined:
    Jul 16, 2019
    Posts:
    4
    @James15478

    thank you for your quick response and for your hint. Unfortunately, I was not able to find the script in my project folder.

    So what I did was searchingall files which "have something to do with" TextMesh Pro and I re-imported them and this did not solve my problem.

    However, I have some TextMesh Pro texts that did not disappear (for some strange reason, see below). existingScript.jpg

    In Unity, if you have a script attached to a game object in the inspector, is there a way to somehow locate it amongst the project files?
    I don't know if it helps. but I right-clicked on the script and clicked "Edit Script". And this gave me this information.
    editScript.jpg

    Do you have any idea? Thank you again for your input and thank you again in advance for any future help!
     
  4. James15478

    James15478

    Joined:
    Apr 2, 2013
    Posts:
    91
    No problem :) Not quite sure, but maybe try reimporting the entire project with Reimport All?
    I see you also have preview packages in use. Those could be related as Preview means it's not production ready.
     
  5. sschimper

    sschimper

    Joined:
    Jul 16, 2019
    Posts:
    4
    I tried reimporting all and this unfortunately didn't seem to work as well.
    Thanks about the hint concerning the Preview packages.

    (The Unity project is basically a team work for my university and I joined the team later. I must admit that I am not 100% familiar with the project and don't know about any preview packages used. But I will make sure to ask the guys in my team and also now I have some more input for some Google searches).
     
    James15478 likes this.
  6. sschimper

    sschimper

    Joined:
    Jul 16, 2019
    Posts:
    4
    I finally figured it out!

    It really had something to do with the "Preview Packages in Use" (thanks again for the hint, @James15478).
    While I was fixing some bugs with TextMesh Pro, I must've imported some preview packages (I don't remember it) and they were screwing somehow with TextMesh Pro.

    What I did was Reseting the Packages to Default, follwoing this thread: https://answers.unity.com/questions/1632351/what-is-preview-packages-in-use.html

    Then I found another helpfull thread about fixing the missing script issue: https://answers.unity.com/questions/1527978/20182-text-mesh-pro-plugin-errors.html

    I followed the steps and now it's working like a charm! :)
     
  7. James15478

    James15478

    Joined:
    Apr 2, 2013
    Posts:
    91
    Cool, glad it worked out for you :)
     
    sschimper likes this.