- Home /
How to display loading screen until the level loads?
Hey Guys! I'm using unity free. I'm having some issues with load level.
Whenever I select one of the levels on the menu, the main level music starts playing instantly and the doesn't wait for the level to load completely. Since Application.LoadLevelAsync() is a Pro feature, I'm stuck. So I thought I should display a loading screen in-between. How can I do this?
Please Help.
Answer by rutter · Jun 04, 2014 at 07:34 AM
Ultimately, a loading screen is just something you put up while a level is loading.
Unless you're doing an async load (which, as you mention, is only available with pro), Unity will leave the last rendered frame up. You can make sure it's something that looks like a loading screen.
The most basic thing you can do is create an OnGUI function that takes care of it:
function OnGUI() {
GUILayout.Label("Loading...");
}
In practice, you should probably use GUI.Label with a rectangle that's somewhere near the middle of the screen.
If you like, you can use a textured quad, or something else that looks even better. Doesn't really matter. All you need to do is show it for at least one frame, then call Application.LoadLevel.
As it happens, I've written up a pretty detailed tutorial here.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
How to create a complicated game over scene ? Help 1 Answer
c# check for destroyed objects to load next scene 1 Answer
Loadlevel can't see each other. 2 Answers
Android load/unload times 0 Answers