Since I upgraded Unity 4.5 I don’t see background texture for the code
var texture = new Texture2D(1, 1, TextureFormat.RGBA32, false);
texture.SetPixel(0, 0, new Color(0.3f, 0.3f, 0.3f, 0.5f));
texture.Apply();
_style = new GUIStyle { fontSize = 12, normal = new GUIStyleState { textColor = Color.green, background = texture } };
_position = new Rect(10, 10, 100, 100);
void OnGUI()
{
if(Event.current.type != EventType.Repaint) return;
GUI.depth = 0;
GUI.Label(_position, _content.text, _style);
}
What might be wrong?