简体   繁体   中英

How to optimize scene loading in Unity3D

I was wondering if there is any way to speed up level loading in unity3d. I currently have loading level between both scenes, but it yet takes around 5 sec to load new level on ipad3. That's quite a lot.

I've optimized all start and awake functions so there is realy little stuf going on there. However i have a lot of sprites in each scene and i think they took most of the loading time.

Could I somehow determine which objects needs to be load at start and which can load during first 10 secs of level? I tried adding level additive but that makes my game to lag for sec or two.

Any smart way of speeding it up?

The time it takes to load your level is determined by the things that are referenced in your scene. The only way to cut loading time is to remove things.

You mentioned it would be fine to load some things after the level has started. You can do this using Resources.Load . However, this will only benefit you if there are no references to the thing you are loading. For example, if you have 100 trees in your scene it won't do you any good reducing that to 10. The tree is still referenced and will have to be loaded before your level can start. If you eliminate all of them then your level can start without loading the tree. It is then up to you to load it using Resources.Load and start planting them, maybe over the course of several frames to prevent a hickup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM