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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question about GuiText

Discussion in 'Immediate Mode GUI (IMGUI)' started by Martin-Schultz, Nov 27, 2007.

  1. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Hey guys,

    I've been playing yesterday with the (very nice) marble tutorial and found something interesting I'd like to ask. When the tutorial was about to add a GuiText object, I did so and the guiText string came up on the game view. I noticed then that there appeared also a 3D gizmo for that Guitext in the scene view. I moved then the 3D gizmo around and the GuiText moved away from the screen.

    So basically my question is, why is there a 3d gizmo for a 2d text screen/hud element? I expected (at first) to be able to move the 2D Guitext object on the game screen around, but not by moving it in the 3d view.

    Uhm, while writing this I think it might be to be able to automatically scale/re-position the guitext element according to the user's screen resolution. Might be a point. Anyway, do I see that right that even the 2D elements are in truth 3D elements?

    Thanks,
    Martin :)
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,355
    Except for 3D Text, no, GUI Text and GUI Texture are 2D. The Z value is used for the order in which they are drawn, and has no effect otherwise, nor does the rotation widget.

    --Eric