Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

TextMeshPro doesn't render text on Android when installed through adb or AndroidStudio

Discussion in 'Android' started by cdepunk, Oct 25, 2020.

  1. cdepunk

    cdepunk

    Joined:
    Dec 27, 2017
    Posts:
    2
    I've created a simple app which uses TextMeshPro to render a text in a 3d world space. When i deploy the game to my Android device using Unity3D "Build And Run" the text is rendered properly, but when I either install it through adb as "adb install game.apk" or through Android Studio it stops rendering any text, as in:

    https://i.stack.imgur.com/1qurZ.png

    https://i.stack.imgur.com/gOaQi.png

    I'm also getting following error message:


    2020-10-25 16:14:28.784 1418-3751/? E/Unity: NullReferenceException: Object reference not set to an instance of an object.
    at TMPro.TMP_Text.GetStyle (System.Int32 hashCode) [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TMP_Text.get_textStyle () [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TMP_Text.StringToInternalParsingBuffer (System.String sourceText, TMPro.TMP_Text+UnicodeChar[]& internalParsingArray) [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TMP_Text.ParseInputText () [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TextMeshPro.OnPreRenderObject () [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TextMeshPro.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00000] in <00000000000000000000000000000000>:0
    at TMPro.TMP_UpdateManager.DoRebuilds () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Canvas+WillRenderCanvases.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    (Filename: currently not available on il2cpp Line: -1)


    Any ideas?
    (i've also posted on https://stackoverflow.com/questions...android-when-installed-through-adb-or-android but i doubt that i'll get any answer there)

    Unity 2019.4.8f1
     
  2. cdepunk

    cdepunk

    Joined:
    Dec 27, 2017
    Posts:
    2
    Solved. Forgot to include .obb archive file when installing app through adb or Android Studio. As I don't have big project I've disabled Split Application Binary so my .obb file would not get generated.
     
    florianpenzkofer likes this.