1
\$\begingroup\$

From what I understand, resources that are local to a particular scene( not a prefab, or texture, material asset etc ) are embedded in the scene file itself, while external resources are just referenced and loaded if needed. The game I'm working on requires all scene be loaded from an asset bundle. Which means by the time the level is loaded, all data should be in memory.

In order to show relatively accurate load progress, I sum of the total bytes of all the needed asset bundles to load the level and divide that by the (approximate) number of bytes loaded so far( calculated using the file size of the asset bundle in bytes multiplied by Unity's AssetBundleRequest.progress value ).

However, this isn't possible with Application.LoadLevel since there's no way to weigh how long it might take relative to the time it took to load the asset bundles.

So, my question is, does Application.LoadLevel take long enough to be an issue if ignored? The presence of an async version of this method leads me to believe there is some need for this. That might only apply for scenes that were built into the game rather than into an asset bundle though.

\$\endgroup\$
  • \$\begingroup\$ you can use load async and check the progress of the AsyncOperation returned, can't you? \$\endgroup\$ – Heisenbug Jul 25 '15 at 18:25
  • \$\begingroup\$ Which returns a value between 0 and 1. If I want the scene load progress to count towards the current loading bar, I need to convert that to a value relative to the rest of the loading tasks. I'm trying to show the progress in one loading bar, basically. \$\endgroup\$ – Ben Jul 26 '15 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.