i’m building a simple end of level info box and can’t quite understand where
some of the default box parameters in GUI skin are coming from. In the GUI.Box statement if i omit the style argument i get a nice box with an outline and rounded corners but when i specify my own custom style i can’t find the parameters to specify outline and corners. Also is it necessary to use the completionStyle.CalcSize function in this way. If Unity can calculate the pixel width of any given text string then presumably it can pre-format the whole thing in one call.
if (displayCompletionForm)
{
var completionText : String = "'" + controller.figures[controller.figureIndex].name;
completionText = completionText + "' completed!";
var boxWidth = completionStyle.CalcSize(new GUIContent(completionText)).x;
completionText = completionText + "\nTime: ";
completionText = completionText + buildTimeString ();
GUI.backgroundColor = Color(0.53, 0.39, 0.27, 0.80);
GUI.Box(Rect((Screen.width - boxWidth) /2, 120, boxWidth + 10.0 ,80), completionText /*, completionStyle*/);
}