Greetings,
I am making a GUI but when I try to create a Label which is a texture, then it doesn’t draw
the texture. The reason is that in theory mi image is NULL, so there’s no image linked to the var.
However, I have attached the image using the inspector, and I don’t undestand why this happen. Here is the code:
var Skin : GUISkin;
var img : Texture2D;
var speed : int;
var fuel : int;
var oxygen : int;
var gravity : int;
var coins : int;
function FillLabels(s : String, f : String)
{
flabel=f;
slabel=s;
}
function OnGUI()
{
GUI.skin=Skin;
GUI.Label ( Rect ( Screen.width/2, Screen.height/2, 65, 65 ), img );
}