Search Unity

Question TextMeshPro (UI) doesn't show up on Android device

Discussion in 'UGUI & TextMesh Pro' started by Inarilein, Mar 22, 2022.

  1. Inarilein

    Inarilein

    Joined:
    Jan 16, 2020
    Posts:
    1
    Hello,
    I have a problem with my TextMeshPro (UI).
    In Unity, the text shows, but on my Android device not and I don't know why.

    It's just an TextMeshPro (UI) text object in a UI Button object on a canvas.
    There is no extra code what manipulates the objects or the text.
    The Assets are in my project assets folder, not something else on my computer, and TextMeshPro is fully imported.

    Device:
    Screenshot_2022-03-22-08-50-49-571_com.Inari.PotionCreator.jpg

    Unity:
    Bild_2022-03-22_085720.png

    Note: I just repositioned my "credit" and "version" text.
    The fact that the screenshot from the device is darker is due to the phone, not the code. So it's not a bug or something else, it's just how my phone takes screenshots sometimes.
    It's just a learning project and will not be published.
     
  2. Seromu

    Seromu

    Joined:
    Nov 30, 2015
    Posts:
    34
    upload_2022-5-12_12-37-19.png

    Change 'Shader Stripping'.
    It works for me.

    Project Sttings -> Graphis -> Instacing Variant -> Set 'Strip Unused(or Keep All)'
     
  3. mrskwiw

    mrskwiw

    Joined:
    Mar 8, 2016
    Posts:
    2
    OP, did you ever get it working? I am having the same problem. My menus made With TMP arent appearing
     
  4. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    We had the same issue a couple of times. Potential causes:
    - Same font material is used for both UI TMP and 3D TMP components (not UI). This can be fixed by duplicating the initial material and only use that for the 3D TMP components
    - Font material is using Shader TextMeshPro/Bitmap Custom Atlas and the GameObject having the TMP component is a child of another GameObject with a RectMask2D component. The solution is to use TextMeshPro/Mobile/Distance Field, or experiment with TextMeshPro/Bitmap, TextMeshPro/Mobile/Bitmap - which we haven't done

    Hope it helps