Why doesn’t
GUI.Label( Rect (0,0,320,480), aboutScreenTexture);
cover the whole screen? The image is 320x480.
I saw this effect too with Label, try DrawTexture instead:
GUI.DrawTexture(Rect (0,0,320,480), aboutScreenTexture);
thx, that did it easily. kinda annoying when the documentation is wrong.
The documentation isn’t wrong; you’re probably not taking into account margin settings and so on when using GUI.Label. DrawTexture doesn’t use GUIStyles.
–Eric
Here is what is in Reference Manual > GUI Scripting Guide > GUI Basics
<<<
To display an image, declare a Texture2D public variable, and pass the variable name as the content argument like this:
/* Texture2D Content example */
var controlTexture : Texture2D;
function OnGUI () {
GUI.Label (Rect (0,0,100,50), controlTexture);
}
If there were other requirements, the documentation should have said so. But the code as presented doesn’t work.
You can file a bug report so it will get seen and tracked.
Unity | Help | Report a problem | Type of problem : Documentation
Try this if you want to stay within the new GUI structure:
GUI.DrawTexture (Rect (0, 0, 320, 480), controlTexture, ScaleMode.ScaleToFit, false, 0);