Good day,
Decided to update Unity from 2020.3.4f to 2020.3.20f1 (19f1). And faced a problem with TMPro namespace. In brand new projects VSCode shows that:
The type or namespace name ‘TMPro’ could not be found (are you missing a using directive or an assembly reference?) [Assembly-CSharp]
TextMeshPro shows like installed in Package Manager. Also I tried to create a TextMeshPro object in hierarchy first and import all mandatory files.
Also tried to upgrade old project to 19.1f/20.1f and got same problem.
Any thoughts what’s wrong and how to fix it?
Thanks in advance.
I just checked and using TMPro has no issues. But I’m using Visual Studio. Never been a fan of VSCode myself. So my guess is the problem lies between VSCode and Unity perhaps. Do you have the Visual Studio code editor package installed also? Not sure if that might help.
To note I have TextMeshPro 3.0.6 installed in the package manager.
All I did was create a new project in 2020.3.20 and added the using to script. Even declared a variable of type TextMeshProUGUI.
1 Like
Should be installed. Thanks for checking.
system
October 15, 2021, 7:31pm
4
Okay, then I will ask this here too…
do you have any assembly definition files
do you have any errors in the console
[quote=Lurking-Ninja, post: 7575781 , member: 754541]
Okay, then I will ask this here too…
[/quote]
Couldn’t answer in previous thread, sorry.
do you have any assembly definition files
do you have any errors in the console.
No, I don’t have any assembly definition files.
Unfortunately no, I don’t have any errors in the console.
It’s odd but I can use TMPro only when I open Asset/Script folder or a script file in VSCode. It doesn’t work when I open root folder of the project.
Opened in Visual Studio, same problem… I don’t understand what’s going on tbh…
Resolved the problem by switching off Preferences → External Tools → Generate .csproj files for → Registry packages.
1 Like