Hi all,
I’ve created a loading screen so that the user isn’t bored whilst waiting for my level to load and I’ve come up against an issue.
When accessing Application.GetStreamProgressForLevel, its always returning as 1. So that when the level isn’t loaded it still outputs it as loaded. This is annoying as it is making it seem like the level is loaded 100% then actually loading the level, leaving a largish wait when it should load at 100%.
I’m using this
var loadingText : GUIText;
var percentageLoaded : float = 0;
function Update () {
if(Application.GetStreamProgressForLevel("level1") == 1) {
loadingText.text = "Level at index 1 has been fully streamed!";
Application.LoadLevel("level1");
} else {
percentageLoaded = Application.GetStreamProgressForLevel("level1") * 100;
loadingText.text = percentageLoaded.ToString();
}
Debug.Log(Application.GetStreamProgressForLevel("MenuTesting"));
Debug.Log(Application.GetStreamProgressForLevel("level1"));
}
Any help will be greatly received! thanks!