- Home /
GUIText scrolling and/or masking?
Hi Guys,
I have a GUI system I built base on OnGUI but its way too slow/expensive. So Ive started recording it based on GUIText and GUITexture but Ive run into a bit of a stumbling block. I need to scroll the text. I can do a "chunky" scroll by re-writing the liens of text up and down, but thats not a very adequate solution. Is there any way to scroll GUIText by playing with UV coords somehow?
Thanks
JK
Well the point is to avoid the GUI.* calls because of their cost.
I have considered creating a texture and using GUIText. Either way, this would leave me needing to create a texture at runtime with the text. Ive started looking into that but any suggestions as to best/most recent method would be helpful.
Answer by NiteFlamesInc · May 19, 2012 at 09:14 PM
you could try making a pic of the text you want to display and do a Scrollbar with a DrawTexture
like
var scrollPosition : Vector2 = Vector2.zero;
function OnGUI () {
scrollPosition = GUI.BeginScrollView (Rect (0,0,900,120), scrollPosition, Rect (0, 0, 820, 110));
GUI.DrawTexture(Rect(10,10,100,100), aTexture, ScaleMode.ScaleToFit, true, 0);
GUI.EndScrollView ();
}
Your answer
Follow this Question
Related Questions
ScrollRect not recognizing content. 0 Answers
Shader and Texture Scrolling depending on Direction 1 Answer
Change the game window built 1 Answer