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
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.
@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).
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.
Do you have any idea? Thank you again for your input and thank you again in advance for any future help!
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.
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).
1 Like
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: What is "PREVIEW PACKAGES IN USE" - Questions & Answers - Unity Discussions
Then I found another helpfull thread about fixing the missing script issue: 2018.2 text mesh pro. plugin Errors. - Questions & Answers - Unity Discussions
I followed the steps and now it’s working like a charm!
Cool, glad it worked out for you
1 Like