Unity : namespace TMPro not found

6.8k Views Asked by At

I have a little problem. Unity doens't recognize a namespace : TMPro. It's the name space that make us to use Text Mesh Pro component with scripts. However, It is not found only in files of a package downloaded on git : XCharts. I don't know how to resolve this... Can u help me ?

Thanks for answers !

2

There are 2 best solutions below

1
yasirkula On BEST ANSWER

This error can occur in 3 different cases:

  • TextMesh Pro isn't imported (unlikely since it is imported by default): import TextMesh Pro from Package Manager
  • XCharts asset's Assembly Definition file isn't referencing TextMesh Pro: you need to select all Assembyl Definition files (.asmdef) inside XCharts folder and add TextMesh Pro to their Referenced Assemblies list (if XCharts was imported via Package Manager, you need to move it to Assets folder to modify its files)
  • Error doesn't show up in Unity console: it's an IDE intellisense issue: https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/
0
eric frazer On

answer: it's plain busted. If you import (by name) com.unity.textmeshpro and then specify "3.2.0-pre.3", this will allow you to use "using TMPro". 3.0.6 is busted.