- Home /
Question by
NessimOnair · Sep 23, 2013 at 02:43 PM ·
tutoriallevelprogress-bar
progress bar script Load level :( HELP
Hello sorry for my french :/ I followed a tutorial to create a progress bar are not my script to load a NIVAUX :/ I is not what to do or meter :/ I need your help called me the code to load the meter :/ level of games thank you youtube video:
http://www.youtube.com/watch?v=-tmjnoe-dqI
var progress : float = 0; var pos : Vector2 = new Vector2(20,40); var size : Vector2 = new Vector2(60,20); var progressBarEmpty : Texture2D; var progressBarFull : Texture2D;
function OnGUI()
{
GUI.DrawTexture(Rect(pos.x, pos.y, size.x, size.y), progressBarEmpty);
GUI.DrawTexture(Rect(pos.x, pos.y, size.x * Mathf.Clamp01(progress), size.y), progressBarFull);
}
function Update()
{
progress = Time.time * 0.05;
}
Comment
Your answer
Follow this Question
Related Questions
Simple 2D Car Game 3 Answers
How to Find Job Unity 3d Desainer 2 Answers
Efficient Way of implementing a Big Waterfall? 0 Answers
Once the slider has reached maximum value: set Level Complete UI (Active) 1 Answer
Loading Bar Help 0 Answers