Search Unity

TextMeshPro Issues

Discussion in 'UGUI & TextMesh Pro' started by renman3000, Oct 20, 2017.

  1. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi there,
    I have two issues.

    A. Sometimes when I adjust the FaceColor of a TMP Font Material/Asset X, the face color on any object with the same material also changes color... however, sometimes it does not. I have noticed alterations to color made in code, effect only the instance of the object, while changes in the editor change all instances.

    ??

    B. While trying to figure out A, I began to play with the OFFSET feature. I am not sure if this is related, but I turned off the computer right after I began to play with OFFSET, on.a single asset. When I turned on the computer today, all material TMP uses for said font is now pink, with out definition, like a missing material.

    Help!
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See FAQ Question 1 on the TextMesh Pro User Forum. In addition, when changing colors or material via scripting, TextMesh Pro respects the Unity convention whereby accessing the material via the TMP_Text.material will result in an instance of the material being created while accessing the TMP_Text.sharedMaterial will used the shared material.

    There are several additional posts about this on the TextMesh Pro user forum.

    Pink text indicates either a missing shader / material or an error with the shader. Since you were playing with the material via scripting, it is possible that you ended up assigning an instance material to those font assets. Since these instance materials are not persistent, upon re-opening Unity these reference would all be missing.

    These font assets can be fixed by reassigning the default material and font atlas texture which are listed in the font asset inspector panel. See the following video which although a bit old now should still provided enough information about how to fix these font assets.
     
    renman3000 likes this.
  3. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699

    Thanks, will keep you posted. Most likely Monday.
     
  4. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi @Stephan_B
    Thanks for your help. I read your post and followed the tutorial, but am unable to solve the issue.

    I have posted some images that may give some insight into he situation that is beyond me. If so, please drop any knowledge you may have.

    Thank you

    * "Normal Mapped shader without a normal map... "


    * Font Atlas, texture seems correct.


    * non fatal error..
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Last edited: Oct 23, 2017
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The image you posted shows an error on the shader which is usually the result of am import issue or shader compiler issue. The easiest way to resolve this is to delete the shader folder located in "TextMesh Pro/Resources/Shaders/..." and then re-importing the package and only selecting this shader folder.
     
    renman3000 likes this.
  7. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699

    Hi yes, please see above post.
    Thank you sir.


    @Stephan_B
    Hi man, I am lucky, in that I just realized I archived this build, the day before the issue appeared, as such, the old archive is fine.

    Thanks for your help. I am unsure what I did to cause it.
     
    Last edited: Oct 23, 2017
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The missing component is something completely different.

    Did this happen when you trying to fix the shader issue? This could have happened if when you re-imported, you re-imported everything instead of just the "TextMesh Pro/Resources/Shaders/..." folder.

    The missing script can also occur if you were using the Free or Source Code version and switched between those two.

    P.S. I would strongly suggest using some kind of source control instead of relying on some manual backup / archival of the project. There are many source control tools available including Collaborate which is built-in to Unity.
     
    renman3000 likes this.
  9. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699

    You know what? I did re-import everything. My bad. I just figured Unity would account for existing items. Damn.

    Cheers