Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by monogon · Apr 29, 2014 at 06:39 PM · performancememoryloadlevelpublishing

(Solved) What is done in preloading ( Application.LoadLevel(x) )

Hello!

This page states that all assets in a scene are preloaded automatically in published builds, however not for scene 0. So the page suggests if you have no splash screen or main menu (which would be scene 0) to create a helper scene which just loads your main scene with Application.LoadLevel(1). My app currently consists of one scene only (scene 0), so it seems that I don't use preloading at the moment. I stumbled upon the above statement and now I'm asking myself what (perfomance?) advantages would come with the above technique. Should I apply it to my published build?

Edit: Is preloading really skipped if I stay in scene 0? What disadvantages are resulting from this? I'd really like to understand.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by monogon · Feb 27, 2015 at 05:08 PM

I just changed my app accordingly, so now I have a scene 0 that shows a splash-screen and loads scene 1. Now the standard splash screen of unity I was already used to loads much faster than before, then my splash screen is shown and after a few more seconds the app starts as usual. This leads me to the assumption that Unity already takes care of everything: I think, if you do not have a scene 0 that loads the next scene, then the pre-loading is done during the Unity splash-screen. This would make the information regarding the pre-loading on the above linked page outdated!

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DiscussedTree · May 22, 2015 at 04:42 PM 0
Share

As of today do you still think the above statement is correct or did you learn that you were wrong (not that I am saying that you are wrong, I'm equally clueless :P)

avatar image monogon · May 22, 2015 at 04:59 PM 0
Share

I am still not completely sure. However, I just reconsidered the topic and I think the information on the Unity help page might be correct. All the page is saying is that the preloading of assets is not done for scene 0 because you want scene 0 to load as fast as possible as its typical use is showing a splash screen.

Seriously, don't worry about this too much. In most cases where you publish your game you would have a scene 0 nonetheless - e.g. a main menu, a logo or a small intro. So in most cases you won't start with your main game as scene 0. If you want to assure that the preloading is done and given the unusual case that your main scene is scene 0, just add a loader-scene at slot 0 like Unity says.

avatar image
1

Answer by jtok4j · May 01, 2014 at 03:20 PM

Hi!

From my understanding, essentially everything from a scene is loaded, and then the scene is opened. Mostly, for a small distraction for the user, people can use a very empty scene, with a guitexture in it, to show the users that something is happening, and at the same time, call application.loadlevel(x) in a start function, so that people have something to look at, and are assured that the game is still loading, instead of stalled or something...

Example: I'm making a game for android, and didn't have any "loading" messages between levels. But loading times for the levels on the phones were about 4-8 seconds... This is a really long time for some people... So, what'd I do? I created an empty scene, and stuck a guitexture with a scale of x:1 Y:1 on it (to show it full screen), and it fills the screen. Then I have a small script running application.loadlevel(x) at the same time. Essentially what this does is: Loads the "loadlevel" scene really fast and shows the "loading" guitexture. At the same time in the background, the next level (I specified in the script) is loading it's contents. But, the great thing is: It doesn't leave the current scene (thus showing the loading graphic) until it's finished loading and ready to show the next level.

(Caveat: All you experts out there, please do correct me if I've got any part of this concept wrong.) :P

Hope this helps!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image monogon · May 01, 2014 at 08:53 PM 0
Share

Thanks for your advice, though it did not really solve my question. To me it is unclear if the preloading really is not done when I stay in scene(0) and if the linked page is up-to-date. Because unity is showing a splash screen and loading when opening the app. Though this might be a loading screen just to initialize the unity player itself ...

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The size of the XAP and performance, after the publication in the shop 0 Answers

Online, Possible Memory Leaks with RPC 0 Answers

Profiler spikes 1 Answer

Performance: Multiple asset references vs. One public asset reference 2 Answers

Should you use = null to free memory for variables declared in Start()? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges