- Home /
Streamed Web Player build not starting the game until the whole thing is downloaded?
Hi! I just got my own website and have been trying to host Unity games on it. Some of my games are pretty big, so they take a while to load. I saw an option to have the content streamed so that the first level is playable while the rest of the game loads. This doesn't seem to be working for me, though?
The way I have it set up is that the very first level (number 0 in the build order) is a sort of loading level game that automatically moves to the main menu when the entire rest of the game is loaded. But uploading it to my website and testing it out, it seems to load the entire game before playing the first scene (which immediately cuts to the main menu, since the entire game is loaded).
Am I supposed to do anything else aside from ticking the "streamed" option and making the loading level scene the first in the build order?
I'm using 5.3.6f1, if that makes a difference.
Thanks in advance for any assistance!
Answer by Bunny83 · Sep 20, 2016 at 10:35 PM
Well, besides keeping the first level small, use as few assets as possible in that first scene and not using any Resources folders there's nothing we can do for you. Streaming has worked for us just fine in the past. Things that need to be loaded with the first scene are:
Well, the first scene
All resources from all Resources folders
All script assemblies (so all your scripts). However scripts are usually small compared to other assets.
Keep in mind that when you switching to the main level right aways in Start or Update, you won't see anything. Loading a level that hasn't yet been loaded will effectively pause the game until the level is loaded.
I'm experiencing the same issue (Building with 5.3.7), no Resources, first level is 265kB according to build stats, Strea$$anonymous$$g is definitely on and the build downloads 100% before starting.
Any ideas?
$$anonymous$$eep in $$anonymous$$d that if the user hasn't yet downloaded the player engine for your build, the webplayer plugin first downloads the player engine from Unity which probably takes much longer than your data file download.
Even when the player version is already present on your PC, the Unity engine itself will initialize itself before starting the first level. If your data file isn't that large it will most likely be ready before the game starts.
How large are your other scenes / your data file in total ? How long (in seconds) does it take for the webplayer start the first scene?
For example you can use a local proxy server that has a log or WireShark to figure out when the download of the data file has finished. For me that's long before the "loading bar" even reached the middle. I don't have a very large build though ^^. Nowadays most internet connections are too fast. If you use FireFox you can press F12 and check the network analyse (usually the last tab). There you can see how long your data file took to download. You can even watch it in realtime while reloading the page.
I don't use google Chrome, but i read that it has a network simulation option in the F12 menu which allows you to simulate a slow network connection.
Your answer
Follow this Question
Related Questions
Webplayer displays garbage on Application.LoadLevel 0 Answers
Unity Web Player streaming issues 1 Answer
How to speed up loading and optimize my game? 1 Answer
How o I prevent streamed video stutter? 1 Answer
Webplayer quality is lousy. 1 Answer