Search Unity

Question Have they removed the normal UI Text?

Discussion in 'Unity Hub' started by mrprofileunite, May 27, 2022.

Thread Status:
Not open for further replies.
  1. mrprofileunite

    mrprofileunite

    Joined:
    Apr 3, 2022
    Posts:
    7
    I am using Unity 2021.3.2f1 and I cannot seem to figure out how to add a UI text. When I right click the hierarchy and go to UI for the Text option it only offers something called "Text - TextMeshPro", which as far as I can tell does not share any component names with the previous "Text" option.
    Have they moved the old "Text" option, or is it just gone entirely?
    And if so, devs, could you please add both in future versions? Because TextMeshPro breaks my code. You can no longer do .getcomponent<Text>() to change the contents of its text box which is quite nice to have.
     
  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    Wrong forum, and time for you look over the docs. Things have changed a lot, a long time ago.
    You can use as a quick fix:
    Code (CSharp):
    1. using Text = TMPro.TextMeshProUGUI;
    Which will allow things to work just using "Text" and the new TMP stuff.
    but that is a stopgap, and even TMPro is on the way out.

    Closing. Please use the proper forum, and before posting, look through and even search, this is a common question if you are not keeping up with things. You will find all your questions asked and answered.
     
Thread Status:
Not open for further replies.