- Home /
Question by
Chaosgod_Esper · Jun 29, 2013 at 08:40 PM ·
guieditorbackgroundeditorguilayout
BeginScrollView - But make background darker?
Hi there
I´m creating a Tool for Unity. Now i need the Horizontal Scroll View. But the content background of the view has the same color as the rest of the unity window.
This is my code right now:
// hide vertical scrollbar
GUIStyle verticalScrollbar = GUI.skin.verticalScrollbar;
GUI.skin.verticalScrollbar = GUIStyle.none;
// Create ScrollView
scrollPos = EditorGUILayout.BeginScrollView(scrollPos, true,false, GUILayout.Height(Screen.width), GUILayout.Height(150));
GUILayout.Label("Test");
EditorGUILayout.EndScrollView();
// restore vertical scrollbar
GUI.skin.verticalScrollbar = verticalScrollbar;
I want to make it darker (or better use a picture as tiled background)..
How can i change the background of the ScrollView?
Comment
Best Answer
Answer by Jamora · Jun 29, 2013 at 11:32 PM
Read up on GuiSkins. http://docs.unity3d.com/Documentation/Components/gui-Customization.html . Create your style and set the image you want as the normal background.
Is there a way to assign a GUISkin without using a public Object for inspector? Cause i create a doking window that is not attached to a GameObject.. so - no inspector available ._.