I have been searching the forums trying to find a solution to this so I figured my search terms or ability stink. I have zone markers that trigger loading different zones and placing the players into them, however, I need to have a custom 2d animated loading level thing go on so that the players know that the level is switching and that their machine didn’t simply freeze.
This is for the desktop deployed app, can anyone point me in the right direction to making this happen that has done it before?
This is really, really simple. What you need to do, is set the trigger object to not destroy on load, and load the new scene. This object should have a script that shows a loading screen during OnGUI(). When the new scene finishes loading (You can check Application class for loading completion), you destroy the trigger object manually, thus taking the loading screen with it.
Note, that there really isn’t a way to check the progress of a loading level or loading asset bundle in Unity standard, the pro version allows you to check the progress of asynchronous operations, while the unity basic version does not allow you to load Unity data asynchronously.
You likely will not be able to build an actual loading progress bar, that I can tell, but you should be able to put an hourglass animation or something like that up.
Look up:
MonoBehaviour.OnGUI()
MonoBehaviour.OnLevelWasLoaded()
GUI.DrawTexture() (this function might have the wrong name, sorry, not near the reference ATM)
Application.LoadLevelAsync() (Unity Pro)
Object.DontDestroyOnLoad()
AsyncOperation.progress (Unity Pro)
Hi,TerXIII, Have you ever tested this function :AsyncOperation.progress (Unity Pro), it seems that it does not work.it returns 0 or 1, no value between.