Hello, i have made a very simple game for the sole purpose of learning and expanding my knowledge. The game is done and i published it here: www.pituligames.com/brikker.html
The only problem is that when i try to play a level, it takes a long time to load the level. If you play it, you would know what i mean. I am building it for webplayer. I don’t know if i should use streamed or not streamed, what is the difference? When i build it, the file sizes are:
4KB for html file and 2,497KB for .unity3d file. Is this too much? I have tried to find answers on the unity manual and on youtube but i can’t find anything on this topic. Please Help.
The basic idea for streaming is to load some light scenes first and have the player start playing those, while the heavier scenes load in the background.
What other options are available? what is the difference between streamed and not streamed, and would this help at all?
I removed the background sound and it decreased the .unity3d file from 2497KB to 177KB. but it still takes a long time to load.
Is it one massive script or is it smaller scripts calling on the needed scripts? Large scripts takes time for it to read. This is just an assumption as I’m taking you on your word that its takes a while to load.
That page gives quite a lot of info about how Unity’s webplayer streaming works, I’d really suggest reading it over again if you don’t understand what it does. If it’s not the actual downloading of data that takes a lot of time, it could be the level loading. Try making a desktop build and see how long it takes to load the level. If it still feels like quite a lot of time, you will need to look into optimizing the level.
I tried your game, and the loading time wasn’t so extreme (the biggest pause is after selecting a level, it took maybe 2-3 seconds). It does seem to be related to loading a level, rather than downloading data from your host. It’s quite hard to debug someone else’s project without knowing what’s actually happening.
Try reducing the amount of stuff you do on the first frame (in the Awake or Start functions). Are you using mesh colliders? They take some time to process when first loaded. Try switching to box colliders.