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. Dismiss Notice

Bug 2D text above gameobject

Discussion in '2D' started by supercooldude, Mar 3, 2021.

  1. supercooldude

    supercooldude

    Joined:
    Dec 9, 2012
    Posts:
    9
    So I have a game with the resolution being 1920x1080, my tiles are 32x32 and so are my sprites, so once the game starts and the menus and stuff close which are 1920x1080, it just has the tiled map and a orthographic camera that is size of 4 zoomed in. I created a text object as a child of the GameObject which is a sprite and the text does not display, what am I doing wrong?

    upload_2021-3-3_13-41-52.png

    Zoomed out it is very small since the resolution is 1920x1080

    upload_2021-3-3_13-42-24.png

    How can I get text to display above my small 32x32 sprite?
     
  2. Derekloffin

    Derekloffin

    Joined:
    Mar 14, 2018
    Posts:
    322
    Hard to say here, but my guess is your canvas is set to the incorrect space. It should be in world space. There is a number of tutorials for this sort of thing. Basically the same idea as a enemy health bar.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,529
    You can find the forums for UI here. The 2D forum deals with 2D features i.e. sprites, tilemap etc.