- Home /
Webplayer requires multi-click to star?
Hi guys,
I have a bug about the web-player. I have scene(the main menu of my game), offline everything works, I export the game as web-player (Only steamed). On the scene there is only a a title (static text mesh) and a start text mesh with a box collider and this code
function OnMouseUpAsButton ()
{
if (gameObject.name == "Start")
{
Application.LoadLevel(4);
}
}
As you see super simple. However it doesn't work properly, when the game is online on a site it requires multiple clicks on the start text mesh in order to load the game (I know that is not the dimension because scene 4 is an empty scene with a load asinc function, showing the percentage of the loading).
Do you have any idea why it is doing this?
Thank you.
Answer by Bunny83 · Apr 01, 2014 at 01:04 PM
Well, if it's a streamed webplayer, have you actually checked if the level has finished streaming? Probably not. The point of a streaming webplayer is that it starts immediately when the first scene is loaded. Every other scene is streamed in the background.
You should use Application.CanStreamedLevelBeLoaded to check is a certain level has finished downloading and can be loaded. If you don't like the whole streaming idea, don't build a streaming webplayer. In this case the webplayer will load all levels before the game starts.
thank you, I wasn't sure about it but you saved me a lot of time
Your answer
![](https://koobas.hobune.stream/wayback/20220613141658im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Browser communication example problem 0 Answers
Unity webplayer crashing browser when it is loaded and unloaded into a page using JavaScript 0 Answers
Web player my missing HTML is not working 1 Answer
Webplayer String length fails? 1 Answer
Application.ExternalCall crashing webplayer in chrome 0 Answers