- Home /
How to make loading screen
I need help making a loading screen all I need is a script to wait 5 seconds then load the level?
Please help!!
Answer by Bovine · Jul 10, 2012 at 07:56 PM
Something like...
IEnumerator Start()
{
yield return new WaitForSeconds(5);
Application.LoadLevel("my_first_level");
}
Cheers Bovine
This is a c# script replacing the original Start() method with the above. Post the errors as a comment if you're still getting them and I'll attempt to fix the issue.
You might be able to figure it out by looking at this part of the documentation as Start() above is a coroutine:
http://docs.unity3d.com/Documentation/ScriptReference/index.Coroutines_26_Yield.html
If you're in javascript, I am not sure, but it looks like you don't need the IEnumerator return type for Start() and you can just yield WaitForSeconds(5) - you don't need to yield return new.
I am not a JavasScript bod though, so you'd need to check the syntax.
Your answer
Follow this Question
Related Questions
A simple Splash and Loading screen script please!? 1 Answer
removing numbers after time 3 Answers
make a loading screen 1 Answer
little animated loading disc thing in iOS 0 Answers
Scene looks later 7 seconds. 2 Answers