Thanks chubbspet.
I’m trying to display a “game over” splash screen. I’ve set up a scene, attached the relevant script and the splash screen image, all as desribed in the tutorial. However, when I activate the scene I simply get a blank (blue) screen in the Game panel. I have set up a similar splash screen for the start up menu, and that works perfectly. Below is the script that I am using:
@script ExecuteInEditMode()
var background : GUIStyle;
var gameOverText : GUIStyle;
var gameOverShadow : GUIStyle;
var gameOverScale = 1.69;
var gameOverShadowScale = 1.61;
function onGUI()
{
GUI.Label(Rect((Screen.width - (Screen.height2)) 0.75, 0, Screen.height*2,
Screen.height), “”, background);
GUI.matrix = Matrix4x4.TRS(Vector3(0, 0, 0), Quaternion.identity, Vector3.one*
gameOverShadowScale);
GUI.Label(Rect((Screen.width/(2gameOverShadowScale)) - 150, (Screen.height/(2
gameOverShadowScale)) - 40, 300, 100), “Game Over”, gameOverShadow);
GUI.matrix = Matrix4x4.TRS(Vector3(0, 0, 0), Quaternion.identity, Vector3.one*
gameOverScale);
GUI.Label(Rect((Screen.width/(2gameOverScale)) - 150, (Screen.height/(2
gameOverScale)) - 40, 300, 100), “Game Over”, gameOverText);
}
I have set the GUIStyle variables in the Inspector, again as described in the tutorial.
The only difference between the screen that doesn’t work and the one that does work is the use of GUIStyle in the former. Has this changed between U2 (on which the tutorial is based) and U3?