- Home /
Can I create text in OnGui similar to drawtexture?
Similar to how you can have a texture2d, then get Gui.drawtexture to do the work for you. Is there any similar way to draw text like this? Or do I have to instantiate a new gameobject with a guitext component on it, and cache that component.
Why am I doing this? If you're familiar with how most of valve's menus work, you know that they have simple text buttons without borders on them or anything that highlight on mouse over.
I want to make this, the only difference being that I'm using input from a controller pad.
I already have the script setup to step through each item when the user uses the d-pad or analog stick, all I have to do now is draw each menu item's text and highlight it when it's the current item on the index.
If I wanted, I could make an alpha texture of the text and draw them, but I would like to be able to create this using the engine's text so that I can easily change the menu items and how many items I have very easily.
Answer by Mike 3 · May 10, 2011 at 05:17 AM
You should just be able to use GUI.Label (or GUILayout.Label) for it, changing the style on mouseover
Your answer
![](https://koobas.hobune.stream/wayback/20220613133126im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
what is the correct way to display text on screen 1 Answer
How to Load Text From External Text Document for GuiText by java Script... 1 Answer
Inserting text into GUILayout Box? 3 Answers
guiText.Text do not display text correctly 2 Answers
guitext.text wont change to assigned string on Android 0 Answers