public class LoadingUI : MonoBehaviour {
private UIProgressBar loadingAnim;
public AsyncOperation async = null;
// Use this for initialization
void Start ()
{
loadingAnim = GameObject.Find("Main Camera Menu").GetComponent<UIProgressBar>();
}
// Update is called once per frame
void Update ()
{
if(loadingAnim != null)
{
loadingAnim.value = async.progress;
}
}
public IEnumerator LoadGameMode() {
async = Application.LoadLevelAsync("GamePlay");
yield return async;
}
}