Forget it, i figured out where to put the script. I also used another script...
Making a Loading Screen
Sure, i know that this question was LITERALLY asked a lot of times, but before annoying me, please read the question.
I don't have any trouble with loading screens in my game, as it loads almost instantly even having a lot of things and being very "heavy". I didn't wanted to make a loading screen, but i reached to the conclusion that low spec pcs can easily take even minutes to load my game, and i don't want people to think that my game crashed or something.
So i have been searching around in the internet but i didn't found any explanation to how to make a loading screen. Here's the best thing that i've found: http://answers.unity3d.com/questions/42365/loading-screen.html
The problem is that i am a little confused... If i am making a loading screen, where am i supposed to place the loading script? Do i place it in the main menu's camera, so when the player click on the play button and the game start to change the scene, the game will load? Or do i need to put the script in the actual game scene? I am very confused... I don't even know if it will work because as i said, i have only a few milliseconds before the scene is loaded so i can't precisely tell if it's working. Any help would be appreciated =)
Ah, here is the script that i use to load my scenes. I think i would need to "mix" the two scripts in just one, so here it is. I hope you guys know what do i need to do.
var isQuitButton = false;
function OnMouseUp() {
//are we dealing with a Quit Button?
if (isQuitButton) {
//quit the game
Application.Quit();
}
else {
//load level
Application.LoadLevel(5); //You don't need to mind about the five here. It is just to specificate the scene that is going to load.
}
}
Follow this Question
Related Questions
Loading screen 1 Answer
Unity 5 Loading Screen Script? 3 Answers
WebGL Loading Bar / Splash Screen is gone 0 Answers
It remains this way after the splash screen 0 Answers
Unity won't load please help! 1 Answer