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

Disappearing text

Discussion in 'UGUI & TextMesh Pro' started by AndreasLovesFiveFingerEntertainment, Jan 31, 2020.

  1. AndreasLovesFiveFingerEntertainment

    AndreasLovesFiveFingerEntertainment

    Joined:
    Apr 16, 2017
    Posts:
    14
    I have some weird problems with text in Unity.

    So in edit mode, it all looks fine right, the red text nicely shows up:
    upload_2020-1-31_20-4-2.png

    In the game preview window they also nicely show up:
    upload_2020-1-31_20-4-37.png

    But as soon as I run the game, all off the text disappears:
    upload_2020-1-31_20-5-19.png

    I have no idea what I'm doing wrong here. It's basically a game object with a canvas object as a child which contains a text object. The canvas object has a world object orientation.

    Plus I have no idea what I'm doing I guess.

    Thanks in advance,
    Andreas
     
  2. AndreasLovesFiveFingerEntertainment

    AndreasLovesFiveFingerEntertainment

    Joined:
    Apr 16, 2017
    Posts:
    14
    OK, I managed to fix it myself (finally). But if anybody is interested I will quickly write down what I discovered. The mistake basically boiled down to communication. mistake between me and the developer. We both thought we had to position the text label. So while I tried to position it using the canvas element, he positioned with code. As you can imagine, that does not work well together. So, in the end, I commented out his code and now it works.

    We choose to remove his code because positioning the text inside the canvas elements gives a little bit more precision than using code it seems. But we are n00bs so don't take this as a recommendation ;)