- Home /
Layout of standard rect window?
When I create a rect window, it automaticlly creates this neat shaped window, but with a grey bar at the top, is there a way to remove this gray bar, I can't find the settings in using a gui skin, maybe I'm missing it? And I thought about importing a skin myself, but im using various sizes of windows, so that wouldn't work. Any help appreciated!
I assume this is using the default Unity Window function? The bar at the top is part of the GUI element.
Is there no way to remove it using a skin, cuz' I can by settings make it even larger, so figured I'd be able to do it smaller too. I guess I'll have to make images for each size of window then.
Answer by Bunny83 · Jul 27, 2012 at 02:51 AM
You should study the GUISkin and GUIStyle classes very carefully and try to understand how they work. Each GUIStyle can have a background image. The image is usually stretched across the whole element. With the border variable you can specify a border that isn't stretched. For example when you specify a top-border of 15, Unity will keep 15 pixels "as it is" and stretch the rest. Look at the built-in GUISkin textures. When you create a custom skin, it's initialised with the default skin, so you can see how it works.
Also keep in mind that you can change the skin at runtime and you will see the immediate effect. Feel free to play around.
Your answer
Follow this Question
Related Questions
How do i recover a scene? 1 Answer
Why RecTransform.rect.center.Set isn't working? 0 Answers
How do I detect resize event for the game window in the editor? 2 Answers
Detection of Overlap is offset by about 16.5f and increases based on scale. 0 Answers
Editor Scriping: Centering an element in Rect container 0 Answers