I try to build this script.
But an error occured.
How can I solve this???
var percent: float;
var ProcessBar:Texture2D;
var Title:Texture2D;
var Process:float = 0;
function OnGUI(){
var width;
var height;
width = Title.width;
height = Title.height;
GUI.BeginGroup(new Rect((Screen.width-width)/2,200,width,height));
GUI.DrawTexture(Rect(0,0,width,height),Title);
GUI.EndGroup();
width = ProcessBar.width;
height = ProcessBar.height;
GUI.BeginGroup(new Rect((Screen.width - width )/2,400,width,height));
GUI.DrawTexture(Rect(0,0,width,height),ProcessBar);
Color temp = GUI.color; // ';'expected. Insert a semicolon at the
end. (UCE0001)
GUI.color = Color.white;
if( Process < width )
{
Process ++;
GUI.Box(Rect(Process , 0 , width - Process , height) , "");
}
GUI.color = temp;
GUI.EndGroup();
}
so... why don't you press the "correct answer" button? Or even tumbs up? Would be awesome...
– NonakeshJung, you should select his answer as the proper answer to give him credit for helping you out. :)
– mcarriere