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

I can't find the GUIText button

Discussion in 'General Discussion' started by Korish, Dec 30, 2014.

  1. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    In one of the tutorials, it is telling me to get a GUIText from the gameobject dropdown or from the hierarchy dropdown menu. The only thing close to text is under Game Object>UI>Text. Where is the button to add GUIText? Thanks!
     
  2. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I don't believe the newer version of Unity has that anymore (It can still be done coding wise) but I don't believe it's on the Editor it's self. (I couldn't find it either). So I just learn the new UI system lol.
     
  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,381
    It seems like the direction is to use GUI only for editor stuff, and UI for runtime. There's not much reason to use GUI Text objects if thats the case.
     
  4. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    Ok thanks, so this means if I want a GUI integer or text then I would have to do it in code?
     
  5. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Exactly, you'd have to do it by code.

    Such as


    void OnGUI(){

    GUILayout.Label ("I am a label, can you see me?");

    }
     
  7. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    (I only know java script and lua so this is new to me) THANKYOU!!!
     
  8. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    It's under top menu Component > Rendering in latest versions which means you need to have existing object selected to add it.

    BTW there are own forum sections for learning material and/or UI questions :)
     
  9. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    instead of void put function lol.
     
  10. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884

    That's nice to know! Thanks for the info!
     
    Korish likes this.
  11. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    Oh thanks man!!! This is soo helpful, WOOHOO
     
  12. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    How do I get it to be a child of a parent game obj?
     
  13. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
  14. Korish

    Korish

    Joined:
    Dec 30, 2014
    Posts:
    7
    But, this method acts as putting the GUIText as a component to a gameobject, I want the GUIText to be a full fledged gameobject itself, not a gameobject component
     
  15. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    GUIText is always a component on a GameObject. Even when it was in the GameObject menu, all that the menu option would do is create a GameObject with the GUIText component attached.
     
  16. GTEngineer

    GTEngineer

    Joined:
    Jan 24, 2015
    Posts:
    1
  17. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860