I start to use TextMesh Pro in unity3D 2018 to render text and it works well when I set it up in inspector. But by the time I try to reference it in the script in visual studio 2017, I find the vs always warn me there is no such a class. Could anyone give me a suggestion?
Best Answer
You should upgrade Unity to the latest version. It appears there is a problem with TMPro.An issue related to this has been discussed on the Unity Forum
I'm not sure, but I think you need to use the namespace from text mesh pro "using TMPro" and variables look like this "public TextMeshProUGUI aTextMeshProField;"
I had the same issue, and none of the following worked for me: updating Visual Studio 2019 through Visual Studio Installer, updating to latest Unity LTS 2020.3 and the visual studio editor package on Unity Package Manager.
Then I saw there were issues reported years ago regarding namespaces and packages here, to I went to Unity > Edit > Preferences > External Tools and I unticked "Generate .csproj files for Registry Packages", and that did the trick for me.