Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our 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:
    92
    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

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    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:
    92
    @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

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    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.