Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

TextMesh Pro How to use TextMesh Pro in Script?

Discussion in 'UGUI & TextMesh Pro' started by Verdemis, Jul 29, 2018.

  1. Verdemis

    Verdemis

    Joined:
    Apr 27, 2013
    Posts:
    90
    Hello everyone,

    I'm trying to use TextMesh Pro in one of my scripts, but what is the correct namespace? I tried "using TMPro;" but it says it doesn't know this namespace...

    I'm using Unity 2018.2.1 and the latest version of VS.

    Best,
    Verdemis
     
    Last edited: Jul 29, 2018
    BidhanBhuwai likes this.
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,265
    There appears to be some issues related to the generated project solutions where some namespaces coming from packages are not being recognized. Thus far upgrading to Visual Studio 2017 15.7.5 appears to resolve those issues for users.

    Can you confirm what version of VS you are using? If not version 15.7.5, please upgrade to it and let me know if the problem persists.
     
  3. Verdemis

    Verdemis

    Joined:
    Apr 27, 2013
    Posts:
    90
    @Stephan_B I'm using 15.7.5, I updated just befor posting. After restarting Unity three times and rebooting my PC it finally works. :)
     
    Stephan_B likes this.
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,265
    There is definitely something strange going on.

    I ran into this once but have been unable to reproduce it since then. So if anyone else runs into this and you are able to reliably reproduce this issue in a project, please submit a bug report so our scripting folks can take a look to find the root cause of this behavior.
     
unityunity