Problems controlling the GUI skin / style

I’m having a lot of problems controlling the look of the GUI. Altough I can create a styles from scratch which is ok for some things , I’m often quite happy to use the existing Skin with my own tweaks. And cloning a style and modifying it generally works for me but not for all things.

Questions and Problems I’m facing:

  • I can’t seem to turn off the onHover behaviour. I tried modifying the directly. Basically I want to turn onHover off.
  • I can’t figure out how certain things are created in the default skin. How do they achieve the round corners? It doesnt seem to be a background image as it scales really well and the corners are always a consistent size.
  • Is it possible to clone the default GUI skin so its a visible entity in the inspector (I’m sure I saw post about this somewhere some time back but cannot find it)
  1. Make the onHover behavior the same as the onNormal behavior (color and background).

  2. The round corners are achieve by the border settings under the button. “Border: Number of pixels on each side of the Background image that are not affected by the scale of the Control’ shape”

  3. Yea!! You can find them at this 1 and even edit them in Photoshop or Gimp.

Good Luck.

Figured out the problem. It doesn’t make much sense to me, but the window with the white border shows up during GUIStyle.onNormal (didn’t really see what .Active and .Focused are used for)

So I did the following:

GUIStyle style = new GUIStyle("Window")); //Or whatever
style.onNormal = style.normal;
GUI.Window(0, new Rect(windowX, windowY, 600, 450), myWindow, "Menu", style);

and it worked for me! Let me know if it does for you.