Author Topic: Text not visible on iOS  (Read 213 times)

abhijeet1001

  • Newbie
  • *
  • Posts: 3
Text not visible on iOS
« on: June 11, 2018, 07:04:41 AM »
Hi all ,

As the title says , text is visible in unityeditor but when i make ios build and try running on my iphone , it appears blank , like nothing is there :/

Unity version : Unity 2017.3.0p3

PS : seems like it happens when i use my custom font . I tried creating a new textmeshproUGUI object with default font and its working fine , but when i change its font to my font it stops working . It shows up in unity editor / play mode , but not after building it on my iOS device :/ . I tried opening a example scene that comes with tmpro , there was a default exampel text , i created new text and applied my font to it , now this works fine on my iOS device aswell , not sure whats the reason behind it not working in my game scene :(

I am using the latest version available on app store by unity technologies . I have paid for the asset when it was paid but stopped using that version as its just more easy to import the one from unity asset store in my new projects .

PS: changing canvas render mode to - Screen space - camera , fixed it . I am not sure why it wont work with Screen space - overlay
« Last Edit: June 11, 2018, 09:36:10 AM by abhijeet1001 »

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Text not visible on iOS
« Reply #1 on: June 11, 2018, 11:49:02 AM »
Are you using a mixture of <TextMeshPro> and <TextMeshProUGUI> objects that happen to share the same font asset or material preset? If so, these objects could be fighting each other on the ZTest which would cause some of them to disappear.

Let me know if you are using a combination of objects as described above?

abhijeet1001

  • Newbie
  • *
  • Posts: 3
Re: Text not visible on iOS
« Reply #2 on: June 12, 2018, 12:44:56 AM »
Hi Stephan , yes I am using both .

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Text not visible on iOS
« Reply #3 on: June 12, 2018, 01:03:38 AM »
The reason why the text is disappearing is because you have several text objects which are using different renderers (Canvas Renderer and Mesh Renderer) where these two systems are fighting over the ZTest settings on the material that is shared by these text objects. As one system changes the ZTest on the material based on its own needs like for Overlay mode, the other system needs a different ZTest for World Space or different sorting layers or ID.

See the following post for the solution http://digitalnativestudios.com/forum/index.php?topic=1494.msg11115#msg11115

abhijeet1001

  • Newbie
  • *
  • Posts: 3
Re: Text not visible on iOS
« Reply #4 on: June 12, 2018, 05:13:37 AM »
Ok , that makes sense :) Thanks for the solution.