Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TMPro invisible when starting a scene

Discussion in 'Unity UI & TextMesh Pro' started by roseportalgames, Nov 7, 2018.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    45
    TMPro text fields are suddenly invisible when I start a scene. If I change any of them, for example, I change the text or SetActive true/false one, then all of them re-appear.

    See:

    https://imgur.com/a/6KqpAo6

    Using Unity 2018.2.5f1

    Edit: OK so this only happens to one specific Font Asset, Roboto-Bold. I've recreated the Font Asset myself but the issue persists?
     
    Last edited: Nov 7, 2018
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,776
    Can you submit a bug report with a simple scene to allow me to easily reproduce this? Please share the case # when you have it.
     
  3. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    45
    Unity crashes halfway through submitting a bug report because the project is a few gb's big. :/

    Is there a way to submit only part of the project in a bug report?
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,776
    Maybe we can delay having to submit a bug report...

    Are you using a mixture of normal <TextMeshPro> and <TextMeshProUGUI> objects in the same scene where these objects would happen to share the same font asset / material preset?
     
  5. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    45
    I'm a bit confused about the difference. If I search the hierarchy for TextMeshPro and TextMeshProUGUI, some of the results are the same GameObjects. However I do get some more results on TextMeshProUGUI.
     
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,776
    Search using t:type or in this case t:textmeshpro or t:textmeshprougui

    In terms of these two types of text objects, the <TextMeshPro> object works with the Mesh Renderer while the <TextMeshProUGUI> with the Canvas system.

    If you have both of them in the same scene sharing the same materials, we end up with the Mesh Renderer and Canvas Renderer fighting over the ZTest settings on those materials. As such it is possible to end up with some objects not being visible depending on who won the fight. The solution is to use two sets of material presets. One for text objects using the Mesh Renderer and another for the object using the Canvas Renderer.

    Your issue could be something else but this is a possibility worth investigating.

    P..S. Since it's almost 4:00 am for me. I am going to go sleep and follow up tomorrow.
     
  7. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    45
    If I type t:textmeshpro I don't get anything in the scene. I'm trying to upload a bug report but it's been on the halfway now for about 6 hours. It's just too big and I can't seem to select only one scene and its dependencies for a bug report.
     
  8. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,776
    You mentioned the issue only occurs with Roboto-Bold. Is this font asset assigned as a primary font asset to the text objects or is it assigned as a font weight of the primary?

    Try creating a new scene using this font asset in a similar fashion to see if the issue will also occur in the new scene? If it does, the try creating a new project using those same assets to see if you can reproduce the behavior again.