Search Unity

TextMesh Pro TMP Texts not showing in ios app store review process, but works fine on my devices.

Discussion in 'UGUI & TextMesh Pro' started by Shaurizo, Dec 9, 2022.

  1. Shaurizo

    Shaurizo

    Joined:
    Dec 9, 2022
    Posts:
    3
    Hi everyone.

    I'm wondering if anyone has run into a strange problem like this before, or has any suggestions about what might cause it.

    - My game was completed using Unity LTS 2019.4.30f1

    - TMP version was 2.1.4

    - All texts are <TextMeshPro> objects in worldspace (with no <TextMeshProUGUI> objects), rendered by an orthographic cam.

    - Everything works fine on my devices and on testers' devices.

    - I submitted a build (using xcode 14.1) to app store for review.

    - My submission was rejected due to no texts showing in the game! The App store reviewer provided multiple screenshots demonstrating this.

    - I used testflight to install on my devices the same version+build that I submitted for review, and everything works fine! (Delete previous build, restart device, install submitted build via testflight... all texts are visible!) Plus I'm testing with the same version of iOS that the app store reviewer was using. (16.1.2 for iphone, 16.1.1 for ipad.)


    The screenshots the app store reviewer provided show me that:

    - The texts are not visible at all. (Not white boxes. No hint of the texts being there whatsoever.)
    - The problem occurred on both an iphone and ipad.
    - Everything else in my ui system displays fine (sprites for buttons/symbols, quads for backdrops etc), so the camera I use for UI is clearly active.
    - It doesn't appear to be a sorting or render order issue, as even texts that would be floating free of any button or backdrop are not visible.
    - The problem occurs with all text. It isn't limited to one font/material.
    - I have some texts that I animate by accessing mesh verts, so the meshes for those texts are updated every frame, but they're not visible either.
    - It doesn't appear to be an issue caused by localization handler I use (eg, strings not being set), as even non-localized texts don't show.

    I know that worldspace TMP texts and canvas TMP text (UI) texts sharing the same material can cause rendering issues, however all my text are worldspace TMP texts.
    Also I double-checked that my texts don't have a 0 z-scale.

    So given all of the above, it seems to me most likely that the issue is occurring at the shader level. I suspect this is my fault, as I had modified the supplied TMP mobile SDF shader, so I may well have screwed something up. :( Certainly that's the first place I would have looked if this problem had occurred during testing.

    I note that in my modified shader, ZTest was still being set by [unity_GUIZTestMode], and I don't know where that value is actually set, so I wonder if that might relate to the issue. Perhaps it's not being set to LEqual?

    But then I also wonder, if it's a shader issue, how is it possible that the problem doesn't occur on any test devices, and only arises during the appstore review process, despite testing the same version+build via testflight? That really surprised me. :/

    Also, when I build for android, it works fine on my android test devices. And mac and windows standalone builds worked fine too.

    Anyway what I've done so far:

    - Updated to Unity 2019.4.40f1
    - Updated TMP to 2.1.6 (appears to be the most recent version for unity 2019 lts)
    - Reverted back to the supplied Mobile SDF shader.

    I'm preparing to resubmit for review, but the fact that I haven't been able to reproduce the issue *at all* makes me nervous.

    I haven't tried completely removing TMP and then reimporting v 2.1.6, but perhaps I should?

    Has anyone else encountered a situation like this, or does anyone have any suggestions for something else I might have overlooked?
     
    Last edited: Dec 9, 2022
  2. STARvonSTAR

    STARvonSTAR

    Joined:
    Jun 8, 2023
    Posts:
    2
    Did you every manage to sort out what the problem was?

    We're having a similar issue right now. Works on 2 devices, but on an iPhone 13 mini with iOS 17 texts from a specific canvas doesn't show at all. Sprites from a sprite atlas that are in the text show up as they should.

    Thank you in advance.
     
  3. Shaurizo

    Shaurizo

    Joined:
    Dec 9, 2022
    Posts:
    3
    I managed to resolve the issue, but unfortunately I'm still not 100% sure what caused it.

    However I strongly suspect that in my case the problem was what I ended up zeroing in on in my post above regarding me modifying TMP's mobile SDF shader (among other things, I removed #include "UnityCG.cginc" and #include "UnityUI.cginc" as I no longer appeared to need them), combined with ZTest being set by [unity_GUIZTestMode].

    I still don't know where or how unity_GUIZTestMode is set (or whether one of those cgincs plays a part in setting it), but I've read that it's needed when rendering UI objects on canvases. However since all my TMPs were worldspace without using canvases, I just set ZTest as:

    ZTest LEqual

    ...like I would in any other worldspace shader.

    The only other change I made that I didn't later revert was this: Previously I had assigned all my TMP texts to the "UI" layer in the Layer dropdown in the inspector. Before resubmitting, I created a new layer which I just called "myUI" and then reassigned every TMP to that layer. But I have no idea if that had any bearing on the problem. I was just clutching at straws by that point.

    Anyway as luck would have it, after I resubmitted the game to the app store, but before it was approved, I managed to replicate the problem on an iphone 8, and so was then able to quickly test that the new build I had submitted worked, and then sure enough, the app store reviewer found it all worked fine too.

    I still don't know why the problem didn't occur on my test devices. It's almost like unity_GUIZTestMode wasn't being assigned a value and just had a random value depending on the device. Certainly the symptoms were consistent with what you'd expect if Ztest was erroneously set to GEqual or Greater. Or maybe that had nothing to do with it! ¯\_(ツ)_/¯

    Chances are that none of this relates to the issue you're encountering though, I'm sorry to say.

    Good luck. I hope you succeed in sorting it out.