- Home /
How to scroll label view
I need to scroll my label view (text content) instead of scrolling scrollbar.
GUI.skin.label = style;
GUI.skin.horizontalScrollbar = GUIStyle.none;
scrollPosition = GUILayout.BeginScrollView(scrollPosition,GUILayout.Width(768), GUILayout.Height(200));
GUILayout.Label(" Cattle are herbivores that eat vegetation such as grass\n\nCattle stomachs have four chambers which help break down what they eat chambers which help break down what they eat\n\nThere are well over 1 billion cattle in the world\n\nYoung cattle are generally known as calves\n\nAdult females are generally called cows\n\nCattle are red/green colour blind", style);
GUILayout.EndScrollView();
Comment
Can you please rephrase your question? Your code above would put your large text field inside a scrollable area. What is it that you are trying to do ins$$anonymous$$d?