So heres the deal i got everything working in this script but theres one problem…
My gui moves not from down to up but from up to down
Heres script
Code
var barDisplayH : float = 0;
var GUIskins : GUISkin;
var posH : Vector2 = new Vector2(20,40);
var sizeH : Vector2 = new Vector2(60,20);
var progressBarEmptyH : Texture2D;
var progressBarFullH : Texture2D;
var difference : float = 1;
var difference2 : float = 1;
function FixedUpdate() {
difference = (Screen.width / 12.8f) / 100;
difference2 = (Screen.height / 12.8f) / 100;
}
function OnGUI() {
GUI.skin = GUIskins;
GUI.BeginGroup (new Rect (posH.x*difference, posH.y*difference2, sizeH.x, sizeH.y));
GUI.Box (Rect (0*difference,0*difference2, sizeH.x, sizeH.y),progressBarEmptyH);
// draw the filled-in part:
GUI.BeginGroup (new Rect (0*difference, 0*difference2, sizeH.x,barDisplayH * sizeH.y));
GUI.Box (Rect (0*difference,0*difference2, sizeH.x, sizeH.y),progressBarFullH);
GUI.EndGroup ();
GUI.EndGroup ();
}
and maybe to get you know what im trying to do heres a picture
Picture