- Home /
How can I change text alignment for GUI?
i want do alignment of text in GUI.SKIN through scripting upper,middle,center not directly
changing in the GUI.SKIN.Through script i want to change the alignment of text in label
something like this
GUISkin.settings = TextAlignment.left;
Answer by Statement · Mar 03, 2011 at 12:15 PM
See GUIStyle (scripting reference).
You can create/modify GUIStyles by scripting and GUI calls accept a gui style to be passed.
Example:
GUI.Button(rect, "Press me!", customStyle);
xD you provide the answer to your "own" question. Nice Statement ;)
You refer to the question about the script that couldn't be attached in another thread? Otherwise I don't get it :)
I referred to this question ;) (you didn't start it but actually wrote it)
No, I didn't. I just changed the tags twice. At first there was just jibberish so I flagged for close, then the contents were updated and I adjusted the tags to something more relevant.
Hmm, ok, then the revision history is messed up cause it states you added the text :D really strange. $$anonymous$$aybe it got changed by two people at the same time and the system mixed it up.
Your answer
Follow this Question
Related Questions
Understanding GUISkin/GUIStyle BackgroundImage and Border 2 Answers
Problems controlling the GUI skin / style 2 Answers
GUIStyle Border Pixels 0 Answers
Using GUISkin with Hierachy Objects 0 Answers
Unable to find style in skin repaint 1 Answer