- Home /
Rotated multi-coloured text
I am trying to draw multi-coloured text at an arbitrary angle. I can draw coloured text using the material replacement and special shader trick but the only solution for drawing rotated text that I could find was to use GUI.Label in the OnGUI call (and modify the GUI.matrix) but this is limited. It allows me to change the styles colour but not the shader or material.
if u r using GUI.Label, it is jus a text it doesnt have material or shared tht could be applied.. btw u can get the same effect u r looking for with GUI.matrix's http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$atrix4x4.SetTRS.html function
Answer by Jessy · Dec 14, 2011 at 03:29 PM
yup this will make it easy.. if ur camera moves, make the text mesh child of camera!!
$$anonymous$$y game is actually 2D and I use GUI.Label and GUI.DrawTexture to draw pretty much everything. This unfortunately means that to sort things into this scene I need to also use the same method throughout. Adding 3D elements now won't sort between or in front of these items. It's also going to be an Android game and so I need it as fast as possible.
If you're using Unity, your game is not "2D". Unity GUI is made of meshes with shaders, just like Text $$anonymous$$eshes. Unity GUI is also very slow, hence the new GUI system being worked on, so you probably should rethink your approach.
even im working on 2d games in android and iphone, i usually go for Plane(1x1 plane not the unity default) with texture on it for most part of the game, it works fine and flexible for almost everythin i want to do!
also making a game completly in GUI would sometime cause performance issues (even i faced it early) depending upon the game, because ONGUI would em called when ever there is a change in the GUI, so sometimes it goes upto 4 times called again and again (in my case)
http://forum.unity3d.com/threads/115455-Unlit-with-adjustable-Alpha It would have been easy to search for my name on the forum, though. ;-P
Your answer
Follow this Question
Related Questions
Replacing transparency of text with a solid color? 1 Answer
Text Changes to Black 7 Answers
Text/font color 3 Answers