- Home /
Can I disable the Unity preloader so that assets appear progressively as they load?
For simplicity sake let's say I have a web build with three assets in it: a ground plane/terrain, a box and a light. Lets assume these take 40 seconds to load.
Is it possible to skip/disable the preloader and have the scene appear progressively as the assets are loaded? For example, the ground may have the shortest loading time and appear first in 10 secs, 20 secs later the box is loaded and appears, 10 secs later the light appears etc etc. The difference being here is that instead of watching a preloader count down for 40 seconds, you are watching the scene assets load one after the other. Here is an example of what I'm talking about: Progressive Loading
How could I achieve something like this?
Answer by Bunny83 · Jun 13, 2012 at 10:32 AM
No, levels / scenes are always loaded as a whole things. You can have cross references between objects in the scene so all objects have to be available.
What you can do is to use a very small loading scene. Make sure it contains almost no assets. That means don't use the Resources folder and keep the loading scene as simple as possible. Now you can put parts of your level into seperate scenes and load them with Application.LoadLevelAdditive. Keep in mind to check the "streamed" checkbox at the building page so the game starts after the first level is loaded.
For more information see the streaming page
Thanks Bunny83, that confirms a few of my thoughts on this and introduces some new ones also :)
Answer by sooncat · Jun 13, 2012 at 10:41 AM
Build the assetbundle seperatly will get the Effect.
1.build plane assetbundle
2.build box assetbundle
3.build scene assetbundle(leave dependencies here)
4.write a xml for object to load
5.load the xml first.
6.load the scene write in xml and load it.
7.load the plane write in xml and Instantiate it.
8.load the box write in xml and Instantiate it.
I build my webgame in this way and works fine.
Sure, if you have Unity pro you can use assetbundles, but how you use them is up to you ;) You don't have to use xml to load the objects. You would obviously need an xml loaded for this. It depends on how you want to stream the level. If the level is quite complex, i would create an editor script that can split a whole scene into chunks on a per-object basis. Pack the parts into seperate bundles / scenes and load them one by one.
An xml/txt record the res name only.(xml is non-essential)
In any way, we need a record to know which bundles/scenes to be load:
The difference between WebPlayer/Android/Ios should be record in xml/txt , it is convenient to do multi-plantform development.
Thanks sooncat, I think using xml in the way you suggested is a bit beyond me right now, but I'm sure someone else with more know how will find this a very useful approach :)
Your answer
Follow this Question
Related Questions
how to preload assets with progress bar 1 Answer
Newb, How do I add dled brushes to my project? 1 Answer
is it possible to animate a mesh that was imported with another model? 1 Answer
Do you need to uv map every asset going into unity from blender 1 Answer
Standalone Build - Do not bundle resources (just create a folder) 0 Answers