- Home /
heavy scene loading
hello there..i have problem with my environment scene which is the scene a bit heavy when i want to load form mainmenu..how to overcome delay of the scene??i have idea like at the main menu after we enter the button level to environment put up the loading effect to make sure the environment load first before start..we can do it like that or not???if can can u show me how to do??
Sounds like you want asynchronous loading which is a pro feature
Answer by NaRango4 · Nov 06, 2014 at 11:05 AM
Note: this is a Unity Pro feature,
http://docs.unity3d.com/ScriptReference/Application.LoadLevelAsync.html
Here is a code snippet,
public class LoadLevelAsynch : MonoBehaviour
{
AsyncOperation ao;
public void LoadLevel(string LevelID)
{
ao = Application.LoadLevelAsync(LevelID);
}
void Update()
{
if (ao != null)
{
Debug.Log("LOADING....." + ao.progress);
}
}
}
i have pro feature..where to put this code actually??i got "mainmenu" scene and "gymenvironment" scene which is the gymenvironment got the delay
i have a in-between loading scene, where i have a progress bar that shows that load progress.
you can use it whenever you need, you can place this in 'mainmenu' and call 'gymEnvironment' and show progress in 'mainmenu'
I have't tried you scenario but it should work
Your answer
Follow this Question
Related Questions
How to load next level? 2 Answers
Unloading a loaded Scene when load Async for a Loading Bar 1 Answer
Save & Load Game question 3 Answers
LoadSceneMode.Single seems to be not working. 0 Answers
Unity takes forever to load scene 1 Answer