- Home /
Loading Scene in between two scene for web player.
Hi I my making a web player game. In my game first scene will be menu scene. I have kept a loading scene (% indicator as application LoadLevelAsync) for next scene to load. As in web player I have used CanStreamedLevelBeLoaded and GetStreamProgressForLevel for value. In menu scene which is first scene I can select the level to play, when I press any level I am using LoadLevel (scene) to load Loading Scene, there the problem arises that the menu scene is still on scene on top that the loading scene appears or overrides, after few seconds the selected level scene loads and so it want so any progress indication (Eg. 1 to 100 % or 0-1 value).
My Code: In menu scene while pressing level button is
Application.LoadLevel ("loadingscene");
I tried with below code also:
if ( Application.CanStreamedLevelBeLoaded ("loadingscene") ) { Application.LoadLevel ("loadingscene"; }
And in loading scene script:
void Start () { StartCoroutine (ShowProgessBar ()); }
string loadingPercentageText;
IEnumerator ShowProgessBar ()
{
while (!Application.CanStreamedLevelBeLoaded ("level1"))
{
progressValue = Application.GetStreamProgressForLevel ("level1");
loadingPercentageText = _percentageInt.ToString () +"%";
yield return null;
}
Application.LoadLevel (loadscene);
}
Please any help on this. I am trying from long time.
Your answer
![](https://koobas.hobune.stream/wayback/20220613162136im_/https://answers.unity.com/themes/thub/images/avi.jpg)