TextMeshPro can not be resolved as a class in visual studio
TextMeshPro can not be resolved as a class in visual studio
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?
using TMPro;
Yes, I do. Its still not working. Even the tmp example scripts report TextMeshPro can not be resolved.
– jeep
Sep 16 '18 at 18:30
It appears there is an issue with TMPro. forum.unity.com/threads/…
– bolkay
Sep 16 '18 at 18:40
You saved my day! No issues anymore after I upgraded my visual studio 2017 to the latest version.
– jeep
Sep 16 '18 at 19:12
@bolkay you could write an answer to let me accept it.
– jeep
Sep 16 '18 at 19:13
2 Answers
2
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 added "using TMPro" and its still not working, including "public TextMeshProUGUI aTextMeshProField;"
– jeep
Sep 16 '18 at 18:36
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
Are you referencing the TMPro namespace?
using TMPro;– bolkay
Sep 16 '18 at 18:23