var Level: String;
public var LoadCircle : UnityEngine.UI.Image; //Tells Unity that the gameObject is a UI Image
public var fillAmount: float; //Fill Amount for UI Image
function Start () {
var async : AsyncOperation = Application.LoadLevelAsync (Level);
yield async;
Debug.Log (“Loading complete”);
}
In a nutshell, I have no clue what to do with the variables. I have it start off at zero. Over time while the level is loading, I want it to fill the image. Any help ? I’m using unity5
var Level: String;
public var Fill:AsyncOperation;
public var LoadCircle : UnityEngine.UI.Image;
public var fillAmount: float;
function Start () {
Fill = Application.LoadLevelAsync (Level);
Debug.Log (“Loading complete”);
}
function Update(){
LoadCircle.fillAmount = Fill.progress;
}
I believe this actually works. I delved into the scripting api again searching for a way to do this. since my computer runs it automatically, I’m about to test on my phone. Lets hope this works.